PHP Coding

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 53
Joined: Sat May 11, 2013 1:40 am
Location: Nashik, India

Thu Jul 18, 2013 1:43 am

there is no problem in the code, how are you calling this page?

php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Thu Jul 18, 2013 8:45 pm

I don't see anything wrong with the code. The output looks ok to me.


Wed Sep 11, 2013 10:08 am

Change your code to this and call it a PHP page instead of a HTML..

Code: Select all

<title>Associative Arrays</title>
$assoc = array("first_name"=>John","last_name"=>"Smith");
echo $assoc["first_name"] . "<br />";
echo $assoc["first_name"]."&nbsp;".$assoc["last_name"] . "<br />";
The code above with read on a page like this:
John Smith

Post Reply