Welcome Guest, Not a member yet? Register   Sign In
Search for a certain function in all helper files?
#8

[eluser]sophistry[/eluser]
yes, that's right so far.

what you see after the foreach loop is the path to the last helper in your helpers directory.

xwero left out the $matches_array you need in the preg_match() function.

preg_match() is a weird function because you send it an undeclared variable and it makes an array for you.

your preg_match() should look like:
Code:
preg_match(’/^function (.+?)\(/’,$line,$matches_array);

and then inside the foreach loop you need to save the matches array in yet another array.

try the var_dump inside the foreach to see what's really happening and you should get the idea.


Messages In This Thread
Search for a certain function in all helper files? - by El Forum - 08-14-2008, 04:27 AM
Search for a certain function in all helper files? - by El Forum - 08-14-2008, 04:42 AM
Search for a certain function in all helper files? - by El Forum - 08-14-2008, 08:48 AM
Search for a certain function in all helper files? - by El Forum - 08-14-2008, 08:59 AM
Search for a certain function in all helper files? - by El Forum - 08-14-2008, 11:40 AM
Search for a certain function in all helper files? - by El Forum - 08-14-2008, 12:13 PM
Search for a certain function in all helper files? - by El Forum - 08-14-2008, 04:10 PM
Search for a certain function in all helper files? - by El Forum - 08-14-2008, 05:12 PM
Search for a certain function in all helper files? - by El Forum - 08-15-2008, 04:26 AM
Search for a certain function in all helper files? - by El Forum - 08-15-2008, 07:31 AM
Search for a certain function in all helper files? - by El Forum - 08-15-2008, 11:43 AM
Search for a certain function in all helper files? - by El Forum - 08-15-2008, 02:14 PM
Search for a certain function in all helper files? - by El Forum - 08-17-2008, 06:39 AM
Search for a certain function in all helper files? - by El Forum - 08-17-2008, 09:04 AM
Search for a certain function in all helper files? - by El Forum - 08-18-2008, 01:55 AM
Search for a certain function in all helper files? - by El Forum - 08-18-2008, 02:23 AM
Search for a certain function in all helper files? - by El Forum - 08-18-2008, 06:08 AM
Search for a certain function in all helper files? - by El Forum - 08-18-2008, 06:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB