Jump to content

PHP Help - Arrays


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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...