Jump to content


Photo

simple array question


  • Please log in to reply
3 replies to this topic

#1 perezf

perezf
  • Members
  • PipPipPip
  • Advanced Member
  • 301 posts
  • LocationFort Lauderdale

Posted 07 September 2006 - 12:35 PM

why doesnt this work i get an error, Im trying to learn so can some one help
???
<?php
$RatesArray = array(".0725", ".0750", ".0775", ".0800", ".0825", ".0850", ".0875")
echo "$RatesArray[0]<br />";
echo "$RatesArray[4]<br />";
?>


#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 07 September 2006 - 12:36 PM

You are mising a semi-colon on line 2. Line 2 should be this:
$RatesArray = array(".0725", ".0750", ".0775", ".0800", ".0825", ".0850", ".0875"); <-- This is missing

#3 perezf

perezf
  • Members
  • PipPipPip
  • Advanced Member
  • 301 posts
  • LocationFort Lauderdale

Posted 07 September 2006 - 12:37 PM

Parse error: parse error, unexpected T_ECHO in /hsphere/local/home/way2fr3s/2fr3sh.com/PHPLearning/array.php on line 11



#4 perezf

perezf
  • Members
  • PipPipPip
  • Advanced Member
  • 301 posts
  • LocationFort Lauderdale

Posted 07 September 2006 - 12:38 PM

Thank you the problem is fixed now




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users