hi all,
why the output of the following code is
in 1content == hello world
in 0content == hello world
i am using php 4.3.8
since function parse(&$p,$i) is pass by reference i suppose the output is
... == hello world
... == test
<?php
function parse(&$p,$i)
{
if ($i == 0)
{
echo "in 0";
$p['text'][] = "test";
}
else
{
echo "in 1";
$p['text'][] = "hello world";
}
}
parse($part,1);echo "content == ". $part['text'][0] ."<br>";
parse($part,0);echo "content == ". $part['text'][0] ."<br>";
?>