Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Why Dosen't This Work?
Old 07-30-2008, 08:41 PM Why Dosen't This Work?
Skilled Talker

Posts: 52
Trades: 0
i'm still totally noob to php and im workin on it.. i've been trying to figure out arrays
PHP Code:
<?php
$ages 
= array("Aubri"=>5"Logan"=>3"Chris"=>15"Travis"=>0);
echo 
"Aubri is" $ages['Aubri'] . ", Logan is" $ages['Logan'] . ", Chris is"$ages['Chris'] . " " "and Travis is" $ages['Travis'];
?>
I figured that would work.. why isn't it? i get an error for the line with echo on it
it should say
Aubri is 5, Logan is 3, Chris is 15, and Travis is 0
Webmaster Chris is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-30-2008, 11:05 PM Re: Why Dosen't This Work?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Try this:

PHP Code:
<?php
$ages 
= array("Aubri"=>5"Logan"=>3"Chris"=>15"Travis"=>0);
echo 
"Aubri is " $ages['Aubri'] . ", Logan is" $ages['Logan'] . ", Chris is " $ages['Chris'] . " " "and Travis is " $ages['Travis'];
?>
It's always a good idea to tell us what you are getting as well as what you wanted to get.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 07-31-2008, 12:02 AM Re: Why Dosen't This Work?
Skilled Talker

Posts: 52
Trades: 0
ok i see what the problem was.. forgot a .
ok well thanks
i figured it was something deeper than a typo ;\

Last edited by Webmaster Chris; 07-31-2008 at 12:04 AM..
Webmaster Chris is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Why Dosen't This Work?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18643 seconds with 12 queries