[eluser]Nummero2[/eluser]
Ok if I code as following:
Code:
$helpers = glob(APPPATH.'helpers/*_helper.php');
$i=0;
foreach ($helpers as $line) {
preg_match('/function([^\(]+)/',$line,$matches_array);
echo var_dump( $matches_array );
$i++;
}
I get the following on the screen:
"array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } array(2) { [0]=> string(20) "functions_helper.php" [1]=> string(12) "s_helper.php" }"
When I leave the ^ out of the "old" statement I get an empty array as before.
The function in the helper files looks like this:
Code:
function example_helper_test( $echo=false )
so example are the various helper files like: example1 example2 and so on the funcion is always _helper_test .