> Hi,
> Any idea why it is taking the first array as blank and giving me an array
> count of 3 instead of 2?
> $final="http://something.com/cgi-bin/atx/out.cgi?s=63&c=1&l=gals&u=http://bl
> ah.something.com/bs3/index1.htm";
> $final2=explode("http://",$final);
> $res=count($final2);
> echo "".$res
Hey,
Thanks, I have also gotten rid of the blank one like this:
if($final2[0]==""){unset($final2[0]);}
-Ryan
On 10/26/2004 3:36:45 PM, Brent Baisley ([EMAIL PROTECTED]) wrote:
> The result is correct. You are splitting the string based on "http://";.
>
> There are two instances of it, so there
The result is correct. You are splitting the string based on "http://";.
There are two instances of it, so there are 3 resulting elements. Since
there is not text before the first instance, your first array element
is empty. If there was text before the first instance, you would expect
3 re
Hi,
Any idea why it is taking the first array as blank and giving me an array
count of 3 instead of 2?
http://something.com/cgi-bin/atx/out.cgi?s=63&c=1&l=gals&u=http://bl
ah.something.com/bs3/index1.htm";
$final2=explode("http://",$final);
$res=count($final2);
echo "".$res;
print_r($final2);
?>
T
4 matches
Mail list logo