Skip to content

Tag: php

How to Dynamically Access Objects in PHP

I have two stdClass Object’s that have a number of fields. I cannot change the object layout or structure. For example, they both have a phone number: Object A [phone] => Array ( [0] => …

PHP: Delete unique values from an array

I would like to delete all unique values from an array. So lets say I have $array = (1,2,3,5,4,3,4,5,234) the function should delete all unique values and output: $newarray = (3,5,4,3,4,5) I just …