-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
dreamwest... LoL seriously? You're seriously promoting Avant? It's a frickin' plugin, which btw, most of its features IE has long since added to their browser, making Avant practically useless.
-
okay you got me there. FF and IE cannot do that. I have wished I could break a FF tab out into its own window via drag/drop or rightclick or something. But what you CAN do in FF (not IE or chrome) is drag the tab to your desktop and it saves it as a shortcut. Alternatively, you can drag a FF tab to chrome or IE and it will load up the link in those browsers. Can't do it the other way around!
-
I admit, the "smooth buttery transition" effect is kind of cool. But I do not mind that FF or IE is not animated in that regard. Being able to do it is good enough for me
-
you can drag/reorder FF tabs. You can also drag them straight to bookmark toolbar. IE lets you reorder them but can't drag them straight to bookmark bar, which is dumb.
-
also note that the preg_x functions uses the pcre engine (perl compatible regular expressions) instead of the posix engine used by ereg_x functions, so there are some syntax and behavioral differences.
-
[SOLVED] preg_match accepts + although It shouldn't
.josh replied to DEVILofDARKNESS's topic in Regex Help
my guess is in your 2nd preg_match you are checking $nationname instead of $username. -
[SOLVED] split string into array by string position - not delimiter?
.josh replied to Anti-Moronic's topic in PHP Coding Help
$pos = 4; $str = "123|321|123"; $str = preg_split('~(.{'.$pos.'})~s',$str,2,PREG_SPLIT_DELIM_CAPTURE); echo "<pre>"; print_r($str); output: Array ( [0] => [1] => 123| [2] => 321|123 ) -
[SOLVED] preg_match accepts + although It shouldn't
.josh replied to DEVILofDARKNESS's topic in Regex Help
it doesn't. your problem is somewhere else. -
[SOLVED] question about perg_replace...just first few instances?
.josh replied to Anti-Moronic's topic in PHP Coding Help
You are right. The limit will not be enough in those situations. But that's not what you said in your OP so don't get upset at me for your failure to be more specific. 42 -
you can pass an array to a function in php just fine: function blah ($array) { echo "<pre>"; print_r($array); } $x = array('a','b','c'); blah($x); output: Array ( [0] => a [1] => b [2] => c ) are you sure you are passing it in the right place? what does your getDocument method look like?
-
[SOLVED] question about perg_replace...just first few instances?
.josh replied to Anti-Moronic's topic in PHP Coding Help
So I guess you missed the part in the manual where you can pass an optional 4th argument to limit the amount of replaces? -
haha oops... no wait, wait, i DID mean parenthesis. You see, an apostrophe looks like a mini parenthesis, and I didn't want to hurt its feelings by pointing out how it isn't as long as the parenthesis, so I called it a parenthesis to be politically correct. Kind of like how you can't call a midget a midget.
-
well I don't see a closing parenthesis after the ' How are you other than that, where is this "fullname" supposed to be coming from? p.s.- it helps if you actually post what the problem is.
-
cron job
-
[SOLVED] question about perg_replace...just first few instances?
.josh replied to Anti-Moronic's topic in PHP Coding Help
preg_replace -
I tried chrome once, but I don't like it. Funny story. Or sad... One thing I don't like about browsers is how a good chunk of the top of them are taken up by menus and toolbars and tabs and shit. Especially when you have a million addons. So when chrome came out, the minimalist approach to the top of the browser looked like never-ending green fields on the other side of the fence. But then I tried it, and I felt lost, without any direction. I felt I had no control over anything. Going from FF to chrome was like on Shawshank Redemption where that old white dude finally gets out, and he tries to live a normal life and re-integrate into society, but he just couldn't, because he had spent so long locked up. So he ended up hanging himself. I think FF has institutionalized me...
-
[pre] ~<div[^>]*id\s?=\s?["\']displayimage["\'][^>]*>.*?<img[^>]*src\s?=\s?["\']([^"\']*)~is ~ start of pattern delimiter <div literal match [^>]* match 0 or more of anything that is not a > id literal match \s? match 0 or 1 space or tab = literal match \s? match 0 or 1 space or tab ["\'] match a single or double quote (single quote escaped since it is used to wrap the pattern) displayimage literal match ["\'] match a single or double quote (single quote escaped since it is used to wrap the pattern) [^>]* match 0 or more of anything that is not a > > literal match .*? non-greedy match of 0 or more of anything <img literal match [^>]* match 0 or more of anything that is not a > src literal match \s? match 0 or 1 space or tab = literal match \s? match 0 or 1 space or tab ["\'] match a single or double quote (single quote escaped since it is used to wrap the pattern) ( start of a group/match capture [^"\']* match 0 or more of anything that is not a single or double quote ) end of a group/match capture ~ end of pattern delimiter i modifier to make matching case-insensitive s modifier to make quantifiers ignore newline character while matching [/pre]
-
Need help looping thru an array and exctracting something
.josh replied to Webgirl's topic in PHP Coding Help
Your profile says 55. The key to getting people to believe you when you lie, is to remain consistent. Also, real adults learn to actually ask questions instead of make vague subjects and post nothing but code, no question or nothin'...not even going to point out how the comments in it are screaming "homework." -
yeah i posted anyways though because i had to throw in the comment about la not being a state.
-
// put in 'abbreviation' => 'state' for rest of states $states = array('tx' => 'texas','ca' => 'california','mo' => 'missouri'); // example $abbreviation = 'tx'; echo $states[$abbreviation]; p.s.- los angeles is not a state.
-
[SOLVED] Alter how page echo's data grabbed from txt file
.josh replied to DanielHardy's topic in PHP Coding Help
$string = str_replace("\n","",$string); -
http://www.phpfreaks.com/tutorial/basic-pagination
-
the example I gave you was showing the input tag inside the normal html scope. That's why I have opening and closing tags around the value. In the code you just posted, you are within php scope, and you're already using echo, so you need to remove the php tags and echo. <input type='text' name='name' id='name' value='{$_POST['name']}'>
-
well you obviously did not, as the error message clearly states as much