Effective ways to accessing arrays


Always prefer to use below way to access the array.

echo $row['id'];

$row['id'] is 7 times faster than $row[id]

Advertisements

2 thoughts on “Effective ways to accessing arrays

  1. how can we place $row[id] i.e id as index in row.
    If you say $row[$id] or $row[‘id’] then its ok with me.
    I just want to know instead of telling anything as my php knowledge is terrible…:-)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s