Jump to content
Old threads will finally start getting archived ×
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 ×

Grok 🤖

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by Grok 🤖

  1. Shit, wanted to use it in an array, but solved, thanks.
  2. Hello, it's me again, tried everything but got stuck again, my code: $descimdb = $movie->plot(); $smarty->assign('descimdb', $descimdb); My template code: {foreach from=$descimdb item=foo} <td><textarea name="description" cols="60" rows="6">{$foo}</textarea></td> {/foreach} Now I want to use the function strip_tags() to remove the html stuff, but don't know where to put this function , don't want to use {php}
  3. Thanks a lot kenrbnsn, I was so close and now the whole thing is working with unset(), unbelievable
  4. I have another array and I want to unset() these keys, that works, testet with one number, but my problem now is I don't get an array $sourcesnot = mysql_query("SELECT megavideo, novamov, videoweed, movshare, stagevu FROM pm_player_sources WHERE uniq_id = '".$uniqid."'"); //$row4 = mysql_fetch_array( $sourcesnot ); while($row5 = mysql_fetch_assoc($sourcesnot)) { $id = $row5; foreach ($id as $k => $v ) { if ($v > 0){ //$sourcenot = '['.$v.']'; //var_dump($v); //unset($sources[$v]); $arr = array($v); //$arr[] = $v; var_dump($arr); } } } and I get this but I always need only one array
  5. My problem is I'm very bad with arrays, just started with. So here now I get 4 and 6 the others are 0, now I want to unset() 4 and 6 more below in the script from the players because the players (keys) 4 and 6 are already used. I thought I make now a new array and unset them with a foreach, I did like that $arr = array(); $arr[] = $v; but then I get two arrays like I don't know if it will work just try it that way
  6. Yuppi, thanks a lot kenrbnsn, so the loops were right only wrong function, now is there a way to collect these values to make with them unset()
  7. Hello, I try to make some loops, here is my code: $sourcesnot = mysql_query("SELECT megavideo, novamov, videoweed, movshare, stagevu FROM pm_player_sources WHERE uniq_id = '".$uniqid."'"); //$row4 = mysql_fetch_array( $sourcesnot ); while($row5 = mysql_fetch_array($sourcesnot)) { $id = $row5; foreach ($id as $k => $v ) { if ($v > 0){ //unset($sources[$v]); var_dump($v); } } } and that's what I get: but I need only one 4 and one 6 like it is in my database, I think I made a wrong loop and has somebody an idea how to collect them to make an unset() function
  8. No, sorry didn't work
  9. I'm back now I try it like that $sourcesnot = mysql_query("SELECT megavideo, novamov, videoweed, movshare, stagevu FROM pm_player_sources WHERE uniq_id = '".$uniqid."'"); while($row5 = mysql_fetch_array($sourcesnot)) { $id = $row5; //var_dump($id); foreach ($id as $k => $v) { if ($v > 0){ $sourcenot = $v; var_dump($v); } } and I get this but why I do get two times 4 and two 6???
  10. No I made it like that $sourcesnot = mysql_query("SELECT * FROM pm_player_sources WHERE uniq_id = '".$uniqid."'"); //$row4 = mysql_fetch_array( $sourcesnot ); while($row5 = mysql_fetch_array($sourcesnot)) { $id = $row5; var_dump($id); } and I get this Now I want always only the numbers, like here 4 and 6 always where is not a 0, and these numbers I want to unset as key of an array
  11. No, sorry I'm a beginner, I want all the numbers of all columns, I don't know if it's possible
  12. Gives me the same error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
  13. Thanks but don't know how to look at the results, did something like that, but is wrong: while($row5 = mysql_fetch_assoc($sourcesnot)) { $id = $row5['uniq_id']; }
  14. Hello, I try things these are too difficult for me. First I want to select numbers from my database, this is my code: $sourcesnot = mysql_query("SELECT * FROM pm_player_sources WHERE uniq_id = '".$uniqid."' AND Values != '0'"); So I want to get the numbers where is not null, don't know if exists Values and after I want to unset these numbers (keys) from another array
  15. Thanks Mchl
  16. Hello, I'm just trying to modify a mysql field named source_id smallint(2), now I want to make it for more ids then one. I thought to do it like source_id varchar(100) and then write the ids like 53 ¦ 34 ¦ 78 ¦ and so on. Do you think that's a good idea, I'm pretty new with mysql?
  17. Thanks a lot Ken, count() was very wrong I started as well with +1 break but was too stupid for it, I still hope one day I won't be a beginner any more...
  18. Hello, now I made a foreach loop and I wanted to stop it with count < 10 but I don't get it, that's my code: foreach ($results as $res) { echo "<li> <a href='movie.php?mid=".$res->imdbid()."&engine=".$_GET["engine"]."'>".$res-> title()." (".$res->year().")</li>"; } Now I try that it shows only when there are more than 10 only the first 9
  19. Thanks mjdamato looks better yours, but the second function is still not working and I have no clue
  20. The first function works now fine, but I have problems with the second function grabber(inputGrabber) { if(inputGrabber.length == 0) { // Hide the suggestion box. $('#suggestions').hide(); } else if(inputGrabber.length > 2) { $.post(MELODYURL2+'/ajax_grabber.php', {queryString: ""+inputGrabber+""}, function(data){ if(data.length >0) { $('#suggestions').show(); $('#autoSuggestionsList').html(data); } }); } } it doesn't recognize #suggestions and #autoSuggestionsList
  21. Nobody :-\ I am really bad in javascript
  22. Hello, it's me again still trying to modify this script with a new problem, this is my javascript code: and this is my template code: <form action="{$smarty.const._URL}/search.php" method="get" id="search" name="grabber" onsubmit="return validateGrabber('true');"> <input name="keywords" type="text" value="" class="search_keywords" id="inputGrabber" {if $smarty.const._SEARCHSUGGEST == 1}onkeyup="grabber(this.value);" onblur="fill();" autocomplete="off"{/if} /> <input name="btn" value="{$lang.submit_search}" type="submit" class="search_bttn" /> <div class="suggestionsBox" id="suggestions" style="display: none;"> <div class="suggestionList" id="autoSuggestionsList"> </div> </div> </form> The first function doesn't work properly with this if, doesn't show alert and second doesn't work at all...
  23. thanks a lot prestonwinfrey got it
  24. no doesn't show anything :'(
  25. not working, it still takes the the value of the category option
×
×
  • 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.