-
Posts
1,832 -
Joined
-
Last visited
-
Days Won
3
Everything posted by salathe
-
Nodral, did you mean to use array_sum() instead of count()?
-
Not at all, try harder.
-
Your regex starts like /[^OWNER NAME] This is not doing what you think it is! It's actually just checking for "a single character that is not in the set of characters O, W, N, E, R, <space>, A and M". You probably want something like /^(?!OWNER NAME) which makes sure that the line doesn't start with "OWNER NAME". For help on the (?!...) search on "regex lookaround".
-
Not entirely true. When join() was introduced in PHP 3.0b5 (a very long time ago) it was immediately an "alias" for implode(), which means that it does exactly (literally!) the same thing. However, split() and explode() are different functions entirely. split() uses a POSIX regular expression to break a string into pieces (sometimes the regular expression is a string of literal characters). explode() does not use regular expressions, it just splits of the characters given. So, there is some overlap in what split() and explode() can do but they're not the same at all. split() was deprecated as part of the wider deprecation of all of the POSIX regex functions in PHP 5.3.0. None of the other three functions (explode(), join(), implode()) are deprecated.
-
I LOVE THIS FORUM -- LOVE YOU ALL!
salathe replied to xProteuSx's topic in PHPFreaks.com Website Feedback
We love you too. -
I assume the question is staring me in the face but I cannot see it. What exactly is contained in the variables $jjk, $partNames and $decoded?
-
Jumpy09, please don't get all upset because someone points out an alternative service in your "market research" thread that is "not advertising for my potential Web Hosting business". Discussions and alternative business plans (or lack thereof) are an interesting topic, and since you're conducting market research it should be invaluable to you to hear that such services exist, people are using them and people are happy with them. Back to your topic, since I took the time to read your sprawling posts, no I would likely not use such a service. The limits, price, resource allotment seem completely arbitrary (though I'm going to assume you've put a lot of thought into it), and quite frankly those other services which may offer more, or be cheaper, serve me just fine. You're trying to compete in a very, very tough market by reducing your selling points — there is only so far you can stretch to "hey, but we don't oversell" angle. P.S. Please do not put on the moderator hat and ask for discussions to remain in-your-favour. Also, please take a minute to refamiliarise yourself with Rule 14.
-
$number = "00000000000000000000000000000000000000000000042";
-
PHPfreaks best forum thanks.
salathe replied to UrbanDweller's topic in PHPFreaks.com Website Feedback
You're very welcome. -
What about 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 31, 33, 34... ?
-
This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=345058.0
-
Great. Please mark the topic as solved. P.S. Please don't edit out the code snippets in the question.
-
The value of $kill has a whole bunch of whitespace around the number. When this gets written with imagettftext(), it is being written but the text falls off the bottom of the image. So before you try to write it to the image, have $kill = trim($kill);.
-
I restarted sphinx. Apologies for this not getting fixed sooner.
-
There's no real need for regex. $enum_string = "enum('adult','kid')"; $values = explode(',', str_replace("''", "'", substr($enum_string, 5, -1))); Then you can just loop over $values to build/output your HTML.
-
There's no </h3> in your "from" code.
-
Auto check for already posted questions
salathe replied to freelance84's topic in PHPFreaks.com Website Feedback
Simple Machines Forum - Feature Requests -- file a feature request there. -
Lots of people stumble over namespaced nodes with SimpleXML (e.g. your yweather:location). The snippet below shows you how to get the location element and those attributes. $location = $xml->channel->children('yweather', true)->location->attributes(); $city = (string) $location->city; $country = (string) $location->country; echo "Got $city in $country."; More info: http://php.net/simplexmlelement.children http://php.net/simplexml.examples-basic
-
I guess they're turned off for staff then, I don't run any ad blocking software. I'll see what we can do about fixing the error.
-
It takes someone mighty special for me to collaborate with them on their web project.
-
Are you asking me out on a date?
-
There are ads here?
-
What about $post = ':):D8)'; ?
-
Use Google with the "site:" keyword.
-
Variable variables have their uses, but in many cases a basic array would do the job better. To take the example from above, it would (arguably) be better to have: $row['items']['heading'] = "blah"; $row['comments']['heading'] = "hello"; $type = "comments"; echo $row[$type]['heading'];