Sorry for the stupid question folks, but here's some code of mine I'm testing with:
function test_getIndex_Of_Array()
{
$temp = array();
for ($i = 1; $i < 11; $i++) {
$temp[$i - 1] = $i;
}
$count = sizeof($temp);
for ($i = 0; $i < $count; $i++) {
echo $i . ' ' . $temp[$i] . '<br>';
}
}
//////////////////////////////////////////////////////////////////////////////////
function test_ArraySum()
{
$temp = array();
for ($i = 1; $i < 11; $i++) {
$temp[$i - 1] = $i;
}
$sum = array_sum($temp);
echo $sum;
}
the 2 functions are called *in order* from a separate <php> script above that. that script just has the calls in it. I'm getting the echo from the 1st but nothing for the second. What rule about PHP am I missing here?
There really needs to be a place on the web where rules about any IDE should be listed in the forms of enumerations so learning like this doesn't have to take place. After all, coding is nothing more than a bunch of rules...
thanks guys.