Parse error: syntax error, unexpected '[', expecting ')' in /Users/admin/Sites/phptest/array.php on line 5 
Code: <?php
function shippingPrice($zone,$weight){
   $ground = array(2 => array (   
      array(['lower'] => 0,['higher'] => 70,['av'] => 0.147,['base'] => 4.85);    
      array(['lower'] => 70,['higher'] => 100,['av'] => 0.710,['base'] => 14.82);    
      array(['lower'] => 100,['higher'] => 150,['av'] => 0.544,['base'] => 38.20);    
      )  
   )
foreach ($ground[$zone] as $row) {
   if($row['lower'] <=  $weight and $row['higher'] => $weight){
   
       $price = (($weight - $row['base'])*$row['av']+$row['base'])
       break;
    }
echo shippingPrice(2,62)
?>
Error with login script
I am getting an error with my login script:Error:Code: Warning: Cannot modify header information - headers already sent by (output started at /home/bucket/public_html/inc/config.php:7) in
pspell
using pspell, is it possible to get words that would be best in the current phrase?For example take this phrase: who is the fastest pwrson in the world?The word person was misspelled as the person
How to use Substr
I want to check for the word CATEGORY: inside a string which can be CATEGORY: ITEMand remove the word CATEGORY: leaving only ITEM inside the string....In case the string does not have CATEGORY: before
Problem in String replace program's output
Hi all,
Turning Data into URLs?
This may seem very basic to you, but I'm having a hard time figuring out how to do this since I don't even know what the proper term for it is:Background info:Animals Table - animalid, name, photo,
Two warning messages
Quote<b>Warning</b>: mysql_real_escape_string() expects parameter 1 to be string, array given in
Show message after entering data
Hello Colleagues I would like to display messages after entering the data example: " data were successfully " or " Error send data" in advance thanks.
PHP Game
hy i was wondering what's the best method in order to make some automatic updates in a php gamelet's say that the user should gain 1gold each minute but the user is not logged in and the process is
Uploading files/images via forms
Hey all, I am building a database for work that will contain some minor data on plant species along with 4 images. I have developed the form and am able to add the data but due to my abilities and I
How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and use ORDER BY to re-order whether DESC or ASCHow can i do the ORDER BY without re-order first 50