Skip to content
Advertisement

Tag: arrays

Simplify PHP array with same items

I have this PHP array: $this->user_list = array( 0 => ‘Not paid’,1 => ‘Not paid’, 2 => ‘Not paid’, 7 => ‘Waiting, 15 => ‘Waiting’, 10 => ‘Cancelled’ ); How can I simplify …

PHP Array for hard multilevel items

i have this array structure and i want to create other array structure with that: Each array item have a group of characteristics like: I need an array that have this values like Azul=>64GB=>Plastico 128GB=>Cristal if sub item repeats only write the children value Azul=>64GB=>Cristal Only adds Cristal because 64GB exists I have this code in php: Where $arrCaracteristicas have

PHP: Storing arrays within an array seems to be creating copies

This is such a basic question, but I’m unable to find a clear answer anywhere. As I have understood it, storing an object in an array should store a reference, not a copy… so any changes you make to the object subsequently should be visible when you access the object via the array. When searching this topic, I’ve run across

Advertisement