Jump to content

PHP Help - Arrays


Howdy_McGee

Recommended Posts

I just started learning PHP and I got a not very helpful book :/ ...So here's my code for starters

<?php	$num1 = 18;	$num2 = 18 + 5;	$test = array('Alex', 'David', 'Miller');		echo "First Number is " + $num1 + ".";	echo "<br />";	echo "That number Plus 5 is " + $num2 + ".";	echo "<br />";	echo "The first name in the array is " + $test['0'];	echo "<br />";	echo "The second name in the array is " + $test['1'];	echo "<br />";	echo "The third name in the array is " + $test['2'];?>

My problem is that when I display it, it shows 0 instead of echo-ing the text.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...