Methods and Tips to use arrays in php