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)
?>
Writing Windows Device Drivers with C
Yes: one of the nice features of C is void*. You can put anything there and get anything out. Very error prone but absolutely brilliant for device drivers.Try
Need help urgant
why down my code ony return one item instead of all the items selected. $arr =
utl_file open error
i have file in the unix path
Error when call dll from oracle
Hi all, please help me!
Display search result
Hi!I have a SQL database with information about albums and track (music). This is where the user inputs a search term(entersearch.php): Code: <form name="form"
Weird Problem with curl while sending data
I am facing a weird problem with sending data to a site via curl.If i send the value by thisCode:
Cloud Computing?
Hello,I was wondering if anyone could help explain this term to me. I'm starting to hear it a lot now. Tried looking up some definitions on it via Google and on Wikipedia but its all really technical
puting for loop in 1 value
hi ,how do i put this code in 1 value:Code: <?phpfor ($i=1; $i<=5; $i++) { echo $i ; }?>the output will be: 12345how do i put the result in one value ,some thing like :if the
Simultaneous select/update/insert
HiHow would I need to go about when 2 users update a single row simultaneous? And how would I need to go about when 2 users want to edit a row?Should I first lock the table, update the row to indicate
I need to increse 6hours more, and i don't know how???
I need to increse 6hours more, and i don't know how???<tr> <th>{ov_server_time}</th> <th