Jump to content

Kloplop321

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Kloplop321's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. @Jarod Hey, that's cool, haven't been there in ages though. You think you can offer some specific advice on what could better could be done here?
  2. if you go to http://regex.larsolavtorvik.com/ you can test your regex expressions live. It is a very handy tool to bookmark
  3. I am sorry I meant to add on that I already checked those, could you specify more of what you would like for a tutorial site?
  4. using $text = "LeftWidth = 16em\n"; preg_match_all('/([a-zA-Z]*)\s*=(\s*?)([ a-zA-Z0-9]*)\n/i', $text, $result); $newvalue = "24em"; $text = preg_replace('/([a-zA-Z]*)\s*=(\s*?)([ a-zA-Z0-9]*)\n/i', "$1=$2_REMOVE_$newvalue", $text); $text = str_replace("_REMOVE_",'',$text); echo "[$text]<br />\n"; I can get the result you want. The reason why this happens is because when the text is parsed the "newvalue" variable exists so it puts in "$1=$224em\n" This is where preg_replace tries to parse it and may get confused by this. You could use a space instead of _REMOVE_ but then str_replace would so easily take out every space in the whole thing.
  5. you could do echo "$monthup <br>"; echo "$monthdown <br>"; $answer = (int)$monthup + (int)$monthdown; echo $answer; or $monthup = (int)trim($monthup); $monthdown = (int)trim($monthdown); echo "$monthup <br>"; echo "$monthdown <br>"; $answer = (int)$monthup + (int)$monthdown; echo $answer; You may need to cast them to numbers as an integer or a real number[ use (real) instead of (int)] before adding them together. if the variable has a space before the number by accident, trim() will remove it.
  6. you may find this useful http://snipplr.com/view/4333/valid-xhtml-11-strict-flash-embed/ <div> <object type="application/x-shockwave-flash" data="header.swf" width="700" height="116"> <param name="movie" value="header.swf" /> <!--content for when flash is not available --> </object> </div>
  7. I've been working on a tutorial site(I am doing PHP video tutorials) and I would like to know how I can improve my site. Here's the link http://kloplop321.com/php-tutorials/ I think I have made it pretty simple for beginners. Though, I need to redo the first few tutorials(my first time, so rusty, hurried, and not refined) though.
×
×
  • 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.