In PHP I have a multidimensiona l array to record the ticket routes info like following:
[code=php]$tickets=array( array('fromcity '=>Sydney, 'tocity'=>Londo n, 'quantity'=>3))[/code]
every time I want to add a new route, it will check if the route is existing,if so, it will just update the quantity, if not I just use array_push to add the new route in the array.
I am not sure how to process the update.
Thank you for help first!
[code=php]$tickets=array( array('fromcity '=>Sydney, 'tocity'=>Londo n, 'quantity'=>3))[/code]
every time I want to add a new route, it will check if the route is existing,if so, it will just update the quantity, if not I just use array_push to add the new route in the array.
I am not sure how to process the update.
Thank you for help first!
Comment