Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. Yes. Since your first .+? is lazy, and you aren't requiring the following space, and your last .* is greedy, the first .+? is satisfied by the single char match, and the last .* matches everything else. Yes. Or tab or newline.
  2. In the regex I provided specifically: [^\s]+ means match 1 or more of anything that is not a space, tab or newline char.
  3. it matches one of anything not specified. So for example [^a] will match any one character that is not an 'a'
  4. this is what I get: Array ( [0] => .UserNameHere Reason Here [1] => . [2] => UserNameHere [3] => Reason Here )
  5. $CC = ".UserNameHere Reason Here"; preg_match("/^([.!#@+^$_~-])([^\s]+)\s?(.*)$/", $CC, $CCM); echo "<pre>";print_r($CCM);
  6. one is hardcoded and the other isn't?
  7. Your method will result in undesireable results. If the number of rows you get back from the table is less than 10 you are echoing empty cells and adding Nulls into your array. Umm..the same can be said about your method.
  8. So...how is that better? Way I see it, your method is technically less efficient, as it runs 2 conditions every iteration.
  9. You cannot have a class inside a class (nested classes). However, you can extend a class with another class, and the the object you make from the extended class will inherit the parent class's stuff. Example: <?php // parent class class foo { var $x; function set_x($x) { $this->x = $x; } function get_x() { return $this->x; } } // child class class bar extends foo { var $y; // method uses method get_x as if it were its own because it inherited it from foo function set_y_to_x() { $this->y = $this->get_x(); } function echo_y() { echo "y : " . $this->y . "<br/>"; } // method uses property $x as if it were its own because it inherited it from foo function echo_x() { echo "x : " . $this->x . "<br/>"; } } // create an object from class bar $object = new bar(); // call method from foo because bar inherited it $object->set_x('blah'); $object->set_y_to_x(); $object->echo_x(); $object->echo_y(); ?> output: x : blah y : blah
  10. $value['Field']
  11. $limit = 10; for ($x = 0;$x < $limit; $x++) { $results = mysql_fetch_assoc($structure); echo '<td>'; echo $results['Field']; echo '</td>'; $array[] = $results['Field']; }
  12. LoL I had to look... funny how all the women in the women's section are Thai and all the men from the men's section look..."western".
  13. well my whole point in clarifying that by "western" we all mean "american" is because there are many countries in the "western" category.
  14. google web analytics yahoo web analytics omniture site catalyst
  15. unless you go take the tour. I hear this year they let you try on the astronaut gear. Yep, they let you suit up and everything. Hey if you go, be sure to say hi to xcoder's cousin.
  16. blue screen of death
  17. ah okay I get it. So when you say he's your bro-in-law, you really meant he's your cousin, eh? You know, I'm just gonna throw this out there... maybe your cousins in the usa are really, oh I don't know..janitors or something? Work in the lobby souvenir flower shop? Lawnmowers? I'm just wondering, because I know if it were me going to another country, and I got a job at something like nasa, I think it'd be funny to write home and tell my cousin I was an astronaut. Then I could be like "Haha, I fooled you!" Or maybe keep it going as long as possible because I'm too embarrassed to say I sell rocket ship snow globes to whiny brats all day...whatever the case may be. Just sayin', that's what I'd do. I could understand if someone else did that to. Right on.
  18. you're brother-in-law the astronaut, eh.
  19. well your alternative is to lump them all into one category which IMO is kind of just as bad, considering (again, IMO) they are all different cultures.
  20. "american" has been used instead of "western" in this thread several times (not just by me).
  21. ... and saying all western women are xyz isn't? And just to be clear here, by "western women" we all really mean "american" women.
  22. so then if you are saying western women don't know how to give love, and they want and want, and if you give them blood they will want your life too, then why are you going to marry an american woman? Ditch her before it's too late? LOL
  23. so far i haven't been hit up by anything from last.fm. They do have a limit to how many times you can listen to a song before it only lets you listen to 30s of it. But they don't really enforce it all that much. You can listen w/out even registering.
  24. go to last.fm they have it setup to where you can enter in an artist you like and play their 'radio station' and it plays artists similar to them.
  25. you need to escape all those single quotes inside your onClick part. better yet, use heredoc so you don't have to worry about escaping quotes: echo <<<EOF <a href ="maps.php?address={$output}" onClick="window.open('maps.php?address={$output}','Page Name','height=500,width=500,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');">View Map</a> EOF;
×
×
  • 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.