phpcoder
1 yr. ago
FIND STRING IN ARRAY
if (in_array($operatorid, $row5)) {  
}
phpcoder
1 yr. ago
FIND STRING IN STRING
$pos = strpos($browser, $findme);
phpcoder
1 yr. ago
LOWERCASE
$str = strtolower($str);
phpcoder
1 yr. ago
IF PRE QUERY
".($dd=='' ? "":" and dd='".$dd."'")."
phpcoder
1 yr. ago
DLZKA RETAZCA
$numberlenght = strlen($number2);
phpcoder
1 yr. 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
1 yr. ago
PRVE DVA ZNAKY RETAZCA
$twonum = substr($number2, 0, 2);
// ROZDEL STRING PODLA POCTU ZNAKOV
substr($caller_loc, 0, 8);
phpcoder
1 yr. ago
OBSAH POLA ODDELENY CIARKAMI
MAKE STRING FROM ARRAY
$comma_separated = implode(",", $pole);
phpcoder
1 yr. ago
PRINT POLE
print_r($pole);
phpcoder
1 yr. ago
TODAY DATETIME
YESTERDAY
$today = date("Y-m-d H:i:s");
$yesterday = date("Y-m-d H:i:s", strtotime('-1 day'));
phpcoder
1 yr. ago
ZMAZ MEDZERY / DELETE SPACES
$thenumber = str_replace (" ", "", $thenumber);
phpcoder
1 yr. ago
NUM ROWS - POCET MYSQL RIADKOV
$num_rows = mysql_num_rows($result);
phpcoder
1 yr. ago
JEDNODUCHY DELETE
$result21 = mysql_query("DELETE FROM wordpress.wp_terms WHERE term_id='".$row17['term_id']."'");
phpcoder
1 yr. ago
JEDNODUCHY UPDATE
$result2 = mysql_query("UPDATE vfc_form2 SET position='".$posnow."', fixline='".$phone."' WHERE position='".$pos."'");
phpcoder
1 yr. ago
JEDNODUCHY INSERT
$sql=mysql_query("INSERT INTO sms_chat.invitation_sms (sendOperatorId, recieverOperatorId, date) VALUES ('".$sendOperatorId."','".$recieverOperatorId."','".$today."')");
phpcoder
1 yr. 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
1 yr. ago (E)
ZMENA KODOVANIA
'.iconv("utf-8", "iso-8859-1", $row3['first_name']).'