Jump to content

stickman

Members
  • Posts

    18
  • Joined

  • Last visited

About stickman

  • Birthday 02/12/1990

Profile Information

  • Gender
    Not Telling

stickman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Maybe I should simplify my question. If I have "<b ><b >Te</b >st</b >", how do I make it "<b >Test</b >"? And it has to work with various different nested bold tags, for example: "<b ><b >Te<b >s</b ></b >t <b >Test</b ></b >" would become "<b >Test Test </b >".
  2. I have this code for my search: [code] <?php $q_words = array("test", "te"); $title = "test"; $word_ary = array(); foreach($q_words as $q_word) { if(strtolower($q_word)=="b" || empty($q_word) || in_array($q_word,$word_ary)) {continue;} $word_ary[] = $q_word; $title = eregi_replace(quotemeta(stripslashes($q_word)), "<b>\\0</b>", $title); } while(preg_match('#<b>(.*?)<b>(.*?)</b>(.*?)</b>#',$title)) { $title = preg_replace('#<b>(.*?)<b>(.*?)</b>(.*?)</b>#',"<b>\\1\\2\\3</b>",$title); } echo $title; ?> [/code] For the example $title I provided, that works perferctly, but if $title was "test test test", the output would be "<b>test</b> test <b>test</b>". So my question is, is there a way to remove nested <b > and </b >?
  3. [quote author=stickman link=topic=106025.msg423765#msg423765 date=1156820399] I also cant use any loops or it will take like 10 mintues to execute.[/quote] But thanks for the help.
  4. Nevermind my question. That returned the subdirectories name as its own array value and then I was able to convert that into a header in which all the filenames below it fall in that subdirectory. Therefore, that code answered my own question, except I had to do some various array things first.
  5. For this question, I dont think its possible, but it doesnt hurt to ask does it? Anyway, I cant use any FTP function to do this because they only retrieve the first 1000 files and I need it to retrive all of the files which is more than 1000. I also cant use any loops or it will take like 10 mintues to execute. So with these restrictions, is it possible to retrieve an array with all the filenames (in subdirectory/filename.extension format) within subdirectories. This is what I have currently: [code] <?php $data = ""; exec("ls */", $data); print_r($data); ?> [/code] The problems with that is it doesnt include the subdirectory name, for example (subdir1/file.txt and subdir2/file.txt). Thanks in advance for any help that you can offer.
  6. Thank you. That answered my question.
  7. Lets say I have this code: [code] <?php $var = "Text"; if($var==0) {     echo "A string is equivalent to an integer"; } else {     echo "A string is NOT equivalent to an integer"; } ?> [/code] How come everytime I execute that, it outputs: A string is equivalent to an integer I mean, the string "Text" is not the same as the integer 0, so how are they equivalent? Is there something I'm doing wrong or did I miss reading somewhere that a string equals 0 when compared to an integer? Thanks in advance for your help!!!
  8. [quote author=techiefreak05 link=topic=104456.msg416640#msg416640 date=1155708798] wont ading those lines add text boxes?? i dont want that, i just want tthe update all button to update all the inromation at once, i only want one text box for each piece of information [/quote] Yeah. You should just create one form with three different submit buttons with three different names. If you have three different forms, then you'll have to have six different text boxes (in your case).
  9. This line: <input type="text" name="fnameNew" maxlength="30"> And this line: <input type="text" name="emailNew" maxlength="30"> Both have to be within the <form> tags for the update all form or the the values $_POST['fnameNew'] and $_POST['emailNew'] will both be empty.
  10. I'm not sure how to fix that one. I'm not too familiar with the script that True Logic made. The only thing I could think of is that 0.txt wasnt created when the video was uploaded. We'll have to wait and see what True Logic says though.
  11. Since I'm not sure where $img and $img_name are coming from (and a bugfix), change this: [code] $abpath = "./"; $moo = enumUploads(); if(@copy($img, "$abpath/" . $img_name)) { [/code] To this: [code] $abpath = "./"; $img = $_FILES['img']['tmp_name']; $img_name = $_FILES['img']['name']; $moo = enumUploads(); if(@copy($img, $abpath . $img_name)) { [/code]
  12. I dont think you can return an echo (I dont know for sure), so change it to: return "all uploads deleted!";
  13. The GROUP BY satisfies the at least. I dont need to return those rows or know how many rows there are, I just need to know if there is at least one row, but the user can have more. I'm not sure how to use the JOIN syntax.
  14. I meant what is the actually text is when you click Submit. Like the text that is returned when you click Submit. The script might be exitted before it gets to the mail command and that depends on what text is returned. EDIT: Or to make it easier on us, try this script to see if it emails you or not: [code] <?php mail("[youremailhere]","[yoursubjecthere]","[yourmessagehere]"); ?> [/code]
  15. I figured it out. Here is my query for people who are asking the same question. I'm not sure if this is the proper way or not, but it works: [code]SELECT * FROM `table_a` a, `table_b` b WHERE a.id = b.user_id GROUP BY a.user ORDER BY a.user[/code]
×
×
  • 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.