Go here to see what I'm talking about. All data are being encased w/ an array.
<?php
$id = $HTTP_GET_VARS['id']
$content[0]="Some content";
$content[1]="Some content part II";
echo "
<!--html starts here-->
";
echo "$content[$id]";
"
<!--html ends here-->
?>
Obviously, what happens here is nothing is being outputted because it's waiting for $id to have a num value.
I've tried conditionals and that didn't work. I'm not familiar w/ the syntax so it's possible that it's wrong.
if ($id == undefined) {
$id = 0;
echo "$content[$id]";
} else {
echo "$content[$id]";
}
I am basically trying to initialize $id to have a value of 0. The way I have it set-up above does not work. Any help would be appreciated. 😃