$file= ' c/text1text2">text3 ';
I want to get the c/text1text2 part from above $file
I've tried with explode('"','$file') But not worked.
Any other way or different way of using explode ?
Started on the old forum in August 2011 · view the original in the archive · old links redirect here
$file= ' c/text1text2">text3 ';
I want to get the c/text1text2 part from above $file
I've tried with explode('"','$file') But not worked.
Any other way or different way of using explode ?
Try this script cutting a part from page using explode
function cut($start,$end,$from)
{
$s = $from;
$r = explode($start, $s);
$x = explode($end, $r[1]);
return $x[0];
}
$text=cut('c','text2',$file);
athora wrote: $file= ' c/text1text2">text3 ';
I want to get the c/text1text2 part from above $file
I've tried with explode('"','$file') But not worked.
Any other way or different way of using explode ?
$file= ' c/text1text2">text3 ';
list($part_one, $remaining) = explode('"', $file, 2);
echo $part_one;
$part_one = substr($file, strpos('"', $file));
echo $part_one;
$file = blabla(blabla);
$xx= array_reverse(explode('example.com',$file));
$cc = explode('"',$xx**[0]**);
echo"$cc[0]";
I missed [0] in $cc. . . Thanks all. . . Sorry for getting your valuable time for simple mistake. .
I'm Proud to be a Sri Lankan!