Re: [PHP] Fwd: Is it possible???

[email protected] (Stuart Dallas)
Newsgroups php.general
Message-ID <[email protected]>
On 24 Jun 2013, at 13:02, Karl-Arne Gjersøyen <[email protected]> wrote:

> Error in my last post This is corrected:
> 
> $item_amount_in_store = 223;
> $update_amount = 7;
> $item_amount_in_Store += $update_amount;
> 
> It show the result = 227 and not 230. Why is this happen?

Something else is going on to give you 227, but variable names are case sensitive which is why you're not getting what you expect.

<?php
$item_amount_in_store = 223;
$update_amount = 7;
$item_amount_in_Store += $update_amount;
var_dump($item_amount_in_store);
var_dump($item_amount_in_Store);
?>

Output:

int(223)
int(7)

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

> ---------- Forwarded message ----------
> From: Karl-Arne Gjersøyen <[email protected]>
> Date: 2013/6/24
> Subject: Is it possible???
> To: PHP Mailinglist <[email protected]>
> 
> 
> $item_amount_in_store = 223;
> $update_amount = 7;
> $update_item_amount_in_store += $update_amount;
> $update_amoint_in_store is now 227;
> 
> Why? That should be 230!
> 
> Karl
> 
> 
> 
> -- 
> Hjemmeside: http://www.karl-arne.name/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.