Jump to content

1bigbear

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

1bigbear's Achievements

Member

Member (2/5)

0

Reputation

  1. I can't find a way of starting the foreach loop from a certain array, I have an array with 1000 values, and I want to start the loop with the 500th value, skipping the first 500, is this possible?
  2. It is not that simple you need to login before you post and posting the image is complicated is xml, why don't they use php like the normal people do?
  3. Is there a simple way of uploading an image to Picasa and then getting the link to the image? I haven't found anything to do this.
  4. I need to use a database, and I haven't found a better way
  5. I have to build a script that will perform a certain actions at specified intervals, and I don't know how to do it. I have a list of events something like her: walk every 30 minutes run every 10 minutes talk once a day sit once a week I have four actions that need to be performed at different intervals, I have in a database the time when the task was last performed, the interval, and the future time when the action must be performed. Because I can't use cron I am thinking of using a page that reloads every 1 minute as the clock to compare the actual time with the all tasks future time, if they are equal or future time is lower that the actual time then perform the task. What do you think is this a good method or there are more simple ways of doing this?
  6. I am trying to get text from an array, that has 100 words. I want to get two or three random words from the array, what to use to do this? $text= array(one,two, three, things,stuff);
  7. I got some text, and in the text there are a couple of javascripts, <script language='JavaScript' type='text/javascript' src='http://site.com/gfsdgf.js'></script> <script language='JavaScript' type='text/javascript'></script> <noscript><a href=''></a></noscript> And <script language="JavaScript"> flowplayer('in_tvPlayer_0',{ durationColor: '',}); </script> How can I remove only this javascripts, and keep the rest of the text?
  8. I found this $sql="SELECT * FROM data order by id desc limit 10"; but what to use so that query gets only the id that is lower that 1000?
  9. I am trying to get 10 entries from a database, but how to do this, the entries have an id number if I take them according with the id number some problems will appear when I delete some of the entries. What to do?
  10. Hi, I have a foreach $verify="a"; foreach ($value as $each) if ($each == $verify) { function strange( $text) { // do something } }} the error: Fatal error: Cannot redeclare strange But I have to use the strange function on each iteration of the array. How to solve this problem?
  11. I got it working but how to use it in a mysql query $verify="a"; foreach ($value as $each) if ($each == $verify) { print_r ($each); } But how to use it in the search script, to take each name and search, becasue I have to take a value from the array to compare with the database $crit='client'; switch($crit) { case 'client': $sql="select * from client where client.name like '%".$value."%'"; $rez=mysql_query($sql); while($rd=mysql_fetch_array($rez)) { $seno=$rd['value']; } $reswwwult = mysql_query($sql) or die(mysql_error()); }
  12. so it will work automatically, I just have to give write foreach ($name as $each){ if ($each == $databasename){ //do whatever } else { //do whatever else } } and $each will take the next value of the array until it reaches the end? and I dont have to use auto increment?
  13. what is $each? what is it do? does it take take a value from the array? and how to make it take the value of $name[0][1]?
×
×
  • 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.