-
Posts
116 -
Joined
-
Last visited
Everything posted by canabatz
-
Thanks a lot , exactly what i needed
-
im getting the time from other server and the date dosent change there it's showing same date but times after midnight also. what i need is programaticly change the date myself with a script. thanks
-
hi all i have an array that hold times as follow(i define the date): 2016-02-24 16:55 2016-02-24 17:55 2016-02-24 19:55 2016-02-24 23:55 2016-02-24 01:34 -<----here is my problem , i want the date to change if it's after midnight. it shuold be like that automaticly: 2016-02-25 01:34 somthing like that: $day="2016-02-26"; if(strtotime(01:34) > strtotime("23:59")) { $day = date('Y-m-d',strtotime($day."+1 days")); } else { //KEEP CURRENT DATE } the time im geting from a web site with file_get_contents and there the date do not change if after midnight so i got to do it my self any help ? thanks
-
thanks Barand, works perfect!!
-
i changed it to: $results = array( array('name'=>'carl', 'good'=>4, 'time'=>14), array('name'=>'john', 'good'=>4, 'time'=>25), array('name'=>'benny', 'good'=>5, 'time'=>21) ); usort($results, 'resultSort'); echo $results[0]['name']; // benny
-
PHP Parse error: syntax error, unexpected '[' in /home5/bingoga1/public_html/shiluvyco/trivika/calct.php on line 5
-
hi all, im trying to get best results from this list name--------good---------best time carl------------1 ---------14 john------------2 ---------25 benny----------2 ---------21 good represent right answer and bet time represent speed. i need to find who answer most and the least time. so the best from the example is 2-21 i have put the results in array and found the max(good) and the min(best time) how can i found that benny won in table example, he had 2 good and is best time is better then john, carl is out because he have only 1 good. thanks
-
Hi, i got problem in foreach loop, the code is stuck on first loop. any one see any problem in the code? im stuck on it for a day now. thanks ! function get_rss() { global $catArray, $yesterday, $date; $rss = mysql_query("SELECT id, cat, tcat, title, pic FROM portal_coverages WHERE v = 1 AND date BETWEEN ('" . $yesterday . "') AND ('" . $date . "')ORDER BY id DESC"); $resultp = array(); while($row = mysql_fetch_object($rss)) { $resultp[$row -> cat][$row -> tcat] = $resultp[$row -> cat][$row -> tcat] . " <tr> <td><p style='color:#F91010;'>" . $catArray[$row -> cat . "," . $row -> tcat] . "</p></td> <td><img src='http://dossinet.me/" . $row -> pic . "' width='50' height='50' /></td> <td>" . $row -> title . "</td> <td><a href='http://dossinet.me/view," . $row -> id . ".html'>קישור </a></td> </tr> "; } return $resultp; } include("rss/mail_class.php"); $kk=1; $query = mysql_query("SELECT rss_id, user_id FROM `portal_rss`")or die(mysql_error()); $get_rss = get_rss(); while($row = mysql_fetch_object($query)) { $rss_id = unserialize($row -> rss_id); foreach($rss_id as $key) { $x = explode(',', $key); if(!empty($get_rss[$x[0]][$x[1]])) { $title .= $catArray[$key] . ', '; $result .= $get_rss[$x[0]][$x[1]]; } } if(!empty($result)) { $query = mysql_query("SELECT * FROM `user` WHERE `userid` ='" . $row -> user_id . "'")or die(mysql_error()); $rowz = mysql_fetch_array($query); $user['name'] = $rowz['username']; $user['email'] = $rowz['email']; $params = array( 'file' => 'rss', 'subject' => "עדכוני קטגוריה - " . $title, 'from_name' => "עדכוני קטגוריה ", 'vars' => array('cat' => $title, 'post' => $result, 'name' => $user['name']), ); Mail::To($user['email']); Mail::set_mail($params, true); Mail::send_mail($params); } }
-
hi, i got this url: www.world-status.com/&page=2 how can i make it like that: www.world-status.com/page/2 i got this at the moment: RewriteRule ^([^/.]+)/?$ /index.php?cat_id=$1 RewriteCond %{HTTP_HOST} ^world-status.com RewriteRule (.*) [world-status.com...] [R=301,L] RewriteCond %{THE_REQUEST} \/index.php\ HTTP [NC] RewriteRule (.*)index.php$ /$1 [R=301,L] thanks
-
Thanks AGuyWithAthing, im going to try that!!
-
i need to get two or more of id ranges : for example id value 1 1 2 1 3 0 - 4 0 - 5 0 - 6 1 7 1 8 0 - 9 0 - 10 0 - 11 1 12 1 13 1 i want to get the starting id 0f the value 0 to the Third value 0 so the result will be 3-5 and i need to get the second one also 8-9. what is the easiest way to do that? or where to start? thanks
-
Exactly Thanks SergeiSS
-
im little bit sick , it was hard for me to think well , any way thanks for th push for ($i=1; $i<=3; $i++) { for ($z=4; $z<=6; $z++) { echo $i; echo $z."<br>"; } }
-
how can a get this result in for loop: 1 4 1 5 1 6 2 4 2 5 2 6 3 4 3 5 3 6 thanks