$sql_count = 0;
function mysql_myquery( $sql = "" )
{
global $sql_count;
++$sql_count;
return mysql_query($sql);
}
random.choice([1, 2, 3, 5, 9])
$input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
$rand_keys = array_rand($input, 1);
echo $input[$rand_keys[0]] . "\n";
// или
shuffle($input);
echo $input[0] . "\n";
$result = $mysqli->query("SELECT * FROM `entry` WHERE `descr` LIKE '%{$query}%' OR `content` LIKE '%{$query}%' OR `title` LIKE '%{$query}%'");
<?php
header( 'Content-Type: text/html; charset=utf-8' );
$xml = 'http://lenta.ru/rss/top7';
$rss = simplexml_load_file( $xml );
foreach( $rss->channel->item as $key => $item )
{
if( $key == 4 )
return;
$news_title = $item->title;
$news_link = $item->link;
echo $news_link;
echo $news_title;
}
?>
echo "SELECT SQL_NO_CACHE * FROM content WHERE category = 'new' AND title LIKE '%".mysql_real_escape_string($search)."%' GROUP BY thumb ORDER BY id DESC LIMIT $p, $limit";