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)
?>
PHP Blog help
Need help with posting comments in a word press blog? I have a comments page where the comments are sent as email to me (I have the option of either posting it online or deleting it), instead I want
php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]
Problem!
I have another problem, when i run this code i get this error "Parse error: syntax error, unexpected T_ELSE in /home/a1408362/public_html/admin.php on line 41". I can't see why in the code
Check premium expire
Hi,I am making a simple file hosting site and want to check if users premium subscriptions have ended or not. In the database i have premium_start ( time() ) and premium_end ( time() ) that represents
How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..http://90.202.46.253thats the site, if u go on there, regsiter and login u will see that u can then
Performance impact of cookies
Hi, I was just wondering what impact there would be in terms of performance if you where to set then increment the value of a cookie on each page of a site. Also, being a server side script; how
Form File Upload
I've read through tons of resources and tutorials and as far as I can tell, my code is accurate, but for some reason it's not working...My HTML Form:Code: <form action="script.php"
Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data update current data or delete old data from tempproducts to products then it will delete the
please help me in this update statment
hi every one
WS-Security PL/SQL Forms
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod