Jump to content

extrovertive

Members
  • Posts

    235
  • Joined

  • Last visited

    Never

Everything posted by extrovertive

  1. Is it something that can be played on a browser? Well, you gotta store the moves and stuff. Will the data be stored in a flat-file or relational database? Go to phpclasses.org, there's a Genetic Algorithm, which is AI.
  2. Ah, here's the solution. $zips = array(92102, 92127, 92103); $quoted_zips= array(); foreach ($zips AS $v) {     $quoted_zips[]= "'{$v}'"; } $zip_list= implode(',', $quoted_zips); SELECT username, zip FROM usertable WHERE zip IN ($zips)
  3. I'm trying implode: $zips = array('92120', '92127'); $zips = implode(',',$zips); SELECT username, zip FROM usertable WHERE zip IN ($zips); yields no result, yet just using WHERE zip IN ('92120', '92127') does. I have also implode it using '', ',' but still doesnt' work. FIND_IN_SET give the same result.
  4. I have an array - $zips = array('92120', '92127') $zips actually contain a hundred more is generated dynamically. Now, can I use this kind of SQL? SELECT username, zip FROM usertable WHERE zip IN ('$zips') I tried but it doesn't work. Basically, $zips is an array that contain a lot of zip codes from a class I'm using. However, I can't use an array in a "IN" statement for MySQL?
  5. If you go here http://networklao.com/test/scroll.htm you'll see there's a scrolling text. After DHTML.... it doesn't continue. I want it to wrap-around/rollover/continue on the same line)  rather than leaving blank spaces until the text comes back again from the other end. I want it to be like "DHTML . . . . . . .JavaScript Development forum" to continue on. Is there a way to weak this script below? I am not looking for you write a javascript from scratch but for you to tweak the script a bit. Here's the Javascript code: [code] var tWidth='100%';                var tHeight='40px';                  var tcolour='#0033FF';              var moStop=false;                  var fontfamily = 'Microsoft Sans Serif'; var tSpeed=2;        var cps=tSpeed; var aw, mq; var fsz = parseInt(tHeight) - 4; function startticker(){if (document.getElementById) {var tick = '<div style="position:relative;width:'+tWidth+';height:'+tHeight+';overflow:hidden;background-color:'+tcolour+'"'; if (moStop) tick += ' onmouseover="cps=0" onmouseout="cps=tSpeed"'; tick +='><div id="mq" style="position:absolute;left:0px;top:0px;font-family:'+fontfamily+';color:#FF9933;font-size:30px;white-space:nowrap;"><\/div><\/div>'; document.getElementById('ticker').innerHTML = tick; mq = document.getElementById("mq"); mq.style.left=(parseInt(tWidth)+10)+"px"; mq.innerHTML='<span id="tx">'+content+'<\/span>'; aw = document.getElementById("tx").offsetWidth; lefttime=setInterval("scrollticker()",50);}} function scrollticker(){mq.style.left = (parseInt(mq.style.left)>(-10 - aw)) ?parseInt(mq.style.left)-cps+"px" : parseInt(tWidth)+10+"px";} window.onload=startticker; [/code] Or, if anyone can point me to a script does does horizontal wrap around text, let me know.
×
×
  • 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.