Jump to content

[SOLVED] General Questions


clanstyles

Recommended Posts

1) Where can I learn up on foreach statemnts? Also, those are for php 5.0 and up right?

 

2) Where can I get a list of mysql commands? Like I know SELECT INSERT UPDATE DELETE but ive seen a lot of stuff ive never even heard of before. Like GROUP () and sum() and werid weird stuff. But i can use those a lot and want to see what else there is.

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/58612-solved-general-questions/
Share on other sites

a watered down version of foreach is basically you can apply or use a whole array for something

like lets say you want to add a continuous +1 to each value of an array you can say

<?php
$i = 1;
foreach($myarray as $value) //$value is the standard foreach placeholder var
{
$value+$i;
echo $value."<br/>";
$i++;
}
?>

 

its most often used for echoing o complex sorts although you can write sort functions most of the time its easier to sort via a foreach type function

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.