[0] => cg/template [1] => search [2] => start [3] => endingnow, what if I wanted to check each of these values and see if the value string started with "cg/"
I tried doing something like this,
foreach(array_values($checks[1]) as $checks) { if(stristr($checks, "cg/") === FALSE) { $checks = "cg/". $checks; echo $checks; } }Which is going to add "cg/" to the ones that don't have it. But if the value already has it then it's not going to echo it out along with the rest.
So basically, how would I check each value in an array, modify the values without "cg/" to include "cg/" and then print everything out?