Newbie need Help with php code!!

Thread Solved

Join Date: Aug 2008
Posts: 21
Reputation: Tootlol is an unknown quantity at this point 
Solved Threads: 0
Tootlol's Avatar
Tootlol Tootlol is offline Offline
Newbie Poster

Newbie need Help with php code!!

 
0
  #1
Aug 18th, 2008
Hi, recently I just started learning php as a complete beginner, and I wrote some codes that wasn't able to show up on my browser. Please check to see if there is anything wrong with it. This is the exactly what I used.

<?php



$prices= array( ‘Tires’=>100, ‘Oil’=>10, ‘Spark Plugs’=>4 );


foreach ($prices as $key => $value)
echo $key.’=>’.$value.’<br />’;

while( $element = each( $prices ) )
{
echo $element[ ‘key’ ];
echo ‘ - ‘;
echo $element[ ‘value’ ];
echo ‘<br />’;
}


?>
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 849
Reputation: R0bb0b is on a distinguished road 
Solved Threads: 67
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Practically a Posting Shark

Re: Newbie need Help with php code!!

 
0
  #2
Aug 18th, 2008
do a find and replace in your script for the following:
replace ‘ with '
replace ’ with '
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss

-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 21
Reputation: Tootlol is an unknown quantity at this point 
Solved Threads: 0
Tootlol's Avatar
Tootlol Tootlol is offline Offline
Newbie Poster

Re: Newbie need Help with php code!!

 
0
  #3
Aug 18th, 2008
Originally Posted by R0bb0b View Post
do a find and replace in your script for the following:
replace ‘ with '
replace ’ with '


wow thank you very much!! I didn't notice that
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 849
Reputation: R0bb0b is on a distinguished road 
Solved Threads: 67
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Practically a Posting Shark

Re: Newbie need Help with php code!!

 
0
  #4
Aug 18th, 2008
Originally Posted by Tootlol View Post
Hi, recently I just started learning php as a complete beginner
after you go through enough wild goose chases, you will learn to look for the stupidest stuff first.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss

-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 84
Reputation: MVied is an unknown quantity at this point 
Solved Threads: 5
MVied's Avatar
MVied MVied is offline Offline
Junior Poster in Training

Re: Newbie need Help with php code!!

 
1
  #5
Aug 19th, 2008
Originally Posted by R0bb0b View Post
after you go through enough wild goose chases, you will learn to look for the stupidest stuff first.
We all still miss a semicolon now and then.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 572 | Replies: 4
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC