Array Example in PHP

Leave a Comment
Step:1 Create Php Page



Step:2 Coding

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Array</title>
</head>
<?php

$a=array("10","x"=>20);

echo "Numeric array :- ".$a[0].'<br>';//Numeric array method
echo "Assosiative array :- ".$a["x"];//assosiative array method

?>
<body>
</body>
</html>

Step:3 Save it on C drive => wamp folder => www folder => name your folder

Step:4 For Run Click on wampmanager


Step:5 Now Select Your Project and Run it



Next Post Newer Post Previous Post Older Post Home

0 comments :

Post a Comment

Contact Us