phpcoder
9 months ago
FIND STRING IN ARRAY
if (in_array($operatorid, $row5)) {  
}
phpcoder
9 months ago
FIND STRING IN STRING
$pos = strpos($browser, $findme);
phpcoder
9 months ago
LOWERCASE
$str = strtolower($str);
phpcoder
9 months ago
IF PRE QUERY
".($dd=='' ? "":" and dd='".$dd."'")."
phpcoder
9 months ago
DLZKA RETAZCA
$numberlenght = strlen($number2);
phpcoder
9 months ago
ROZDEL STRING PODLA ZNAKU BEZ POLA
list($user, $pass, $uid, $gid, $gecos, $home, $shell) = explode(":", $data);
//S POLOM
$pizza  = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
echo $pieces[0]; // piece1
phpcoder
9 months ago
PRVE DVA ZNAKY RETAZCA
$twonum = substr($number2, 0, 2);
// ROZDEL STRING PODLA POCTU ZNAKOV
substr($caller_loc, 0, 8);
phpcoder
9 months ago
OBSAH POLA ODDELENY CIARKAMI
MAKE STRING FROM ARRAY
$comma_separated = implode(",", $pole);
phpcoder
9 months ago
PRINT POLE
print_r($pole);
phpcoder
9 months ago
TODAY DATETIME
YESTERDAY
$today = date("Y-m-d H:i:s");
$yesterday = date("Y-m-d H:i:s", strtotime('-1 day'));
phpcoder
9 months ago
ZMAZ MEDZERY / DELETE SPACES
$thenumber = str_replace (" ", "", $thenumber);
phpcoder
9 months ago
NUM ROWS - POCET MYSQL RIADKOV
$num_rows = mysql_num_rows($result);
phpcoder
9 months ago
JEDNODUCHY DELETE
$result21 = mysql_query("DELETE FROM wordpress.wp_terms WHERE term_id='".$row17['term_id']."'");
phpcoder
9 months ago
JEDNODUCHY UPDATE
$result2 = mysql_query("UPDATE vfc_form2 SET position='".$posnow."', fixline='".$phone."' WHERE position='".$pos."'");
phpcoder
9 months ago
JEDNODUCHY INSERT
$sql=mysql_query("INSERT INTO sms_chat.invitation_sms (sendOperatorId, recieverOperatorId, date) VALUES ('".$sendOperatorId."','".$recieverOperatorId."','".$today."')");
phpcoder
9 months ago (E)
JEDNODUCHE QUERY

$query2 = "SELECT * FROM prizes WHERE date >= '".$date."' and date < '".date('Y-m-d', $dateplus)."' group by ".$groupby."";                      
$result2 = mysql_query($query2);
while ($row2 = mysql_fetch_array($result2)){
}
phpcoder
9 months ago (E)
ZMENA KODOVANIA
'.iconv("utf-8", "iso-8859-1", $row3['first_name']).'