Is a copy of the data stored in a SQL query array made?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Reloaded
Forum Newbie
Posts: 5
Joined: Mon Jun 14, 2010 2:04 am

Is a copy of the data stored in a SQL query array made?

Post by Reloaded »

So i was having problems with my script and it worked when i put the query into the FOR loop, i had only put the variable that contained "fetch_assoc()" in the FOR loop. I was wondering when you make a query and store the results in the array, then you echo all the results out does PHP make copies of the data or does it echo the data out then delete it from the arary?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: Is a copy of the data stored in a SQL query array made?

Post by s.dot »

echo will just print it
the array still remains intact.. until the end of the php script
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply