Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL

Notices


 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 04-15-2014, 03:28 AM   #8
tomsmith
Registered User
 
Join Date: Apr 2014
Posts: 1
<?php
// create an associative array that is a cart holding items and prices
$cart_array = array(
"cereal" => "5.00",
"coffee beans" => "2.50",
"bananas" => "3.50",
"onion" => "1.00",
"lettuce" => "2.40",
"tomato" => "1.00",
);
// and here is how you can output any key's value you choose
echo "Bananas cost $" . $cart_array["bananas"] . " at this store.";
echo "<br /><br />";
// And here is how you can print the whole array for viewing and debugging
print_r($cart_array);
?>
check this code and reply with output http://tutorialterminal.blogspot.in/

Last edited by tomsmith; 04-15-2014 at 03:28 AM.. Reason: site is missing
tomsmith is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Importance of Php Development for Web Development tech.biztech Programming General 35 11-22-2019 12:37 AM
PHP introduction stevepatton PHP / mySQL 48 06-17-2019 02:02 AM
PHP project training in ahmedabad, live project training in php ahmedabad anantitsolution Post your ad here 1 07-16-2013 07:42 PM
The best source of learn PHP easily at home. chikkiarora Programming General 11 02-10-2013 02:18 AM
Are you aware of the fact that PHP programming is the most widely used one? johnrichards774 PHP / mySQL 3 02-07-2012 05:41 AM


All times are GMT -7. The time now is 09:05 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.