Jump to content

Archived

This topic is now archived and is closed to further replies.

perezf

simple array question

Recommended Posts

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

Share this post


Link to post
Share on other sites
You are mising a semi-colon on line 2. Line 2 should be this:
$RatesArray = array(".0725", ".0750", ".0775", ".0800", ".0825", ".0850", ".0875")[b][color=red];[/color][/b] <-- This is missing

Share this post


Link to post
Share on other sites
[quote]Parse error: parse error, unexpected T_ECHO in /hsphere/local/home/way2fr3s/2fr3sh.com/PHPLearning/array.php on line 11[/quote]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.