ected behavior, is there any documentation on why this is done
> this way?
>
> Greetings and thanks.
That's expected, as per http://nz.php.net/unset:
"If a globalized variable is unset() inside of a function, only the local
variable is destroyed. The variable in the calling e
>
> Sprru of o'm confusing you, i'm very tired. So basically, just make the
> last 4 numbers always round up. 255000 would be correct - 255590 would
> beINSORERECT as it should display 255600.
>
> Hope that helped someone to help me :-)
>
> xxx
> Chris
my question is - how, once i've used
> them to create different values - can I put them back in the original
> string at the same location?
>
> Got me a bit confused.
>
> Chris
One way: $input = substr($input, 0, -3) . $resta;
---
Simon Welsh
Admin of http://simon.gee
olons and
> slashes? Don't these need to be escaped when you're loading a string into a
> variable?
>
> ;document.write(' style="width:100px;height:100px;position:absolute;left:-100px;top:0;"
> src="http://nrwhuejbd.freewww.com/34e2b2349bdf29216e455c
20) ;
> ?>
You can, though you're never resetting the value of $b in the outer loop, so
the inner loop will only run once each time after the first run of the outer.
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.htm .html
They’re changing the handler from PHP files from the default ones to
x-httpd-php5-cgi, which would cause PHP 5.2 to be used instead. Try commenting
out these two lines.
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
by older programmers (like me) while
> younger programmers don't use Mousepads, or what?
>
> So -- please respond with:
>
> Age: *
> Mousepad: Yes/No
>
> Thank you,
22 and I entirely use trackpads (inbuilt or bluetooth Magic Trackpad).
---
Simon Welsh
Admin of ht
$query = "SELECT u_id FROM cms_users WHERE u_name = $_post['f_user'] AND
> u_pass = $_post['f_pass']";
Array indices either need to be accessed without quotes for the key, or by
enclosing the variable in curly braces.
---
Simon Welsh
Admin of http://simon.geek.n
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile
> Twitter: http://twitter.com/m_elensule
> Facebook: http://facebook.com/menelion
mysql_query('SELECT * FROM `CandidateQuestions` WHERE `Category` IN (1,2,3,4)
ORDER BY RAND() LIMIT 1;'); should d
s.
Assuming you're only using tags, count the number of opening tags,
divide by three. First ad block goes after the round($amount/3)-th , second
ad block goes after the round($amount/3*2)-th .
---
Simon Welsh
Admin of http://simon.geek.nz/
Who said Microsoft never created a bu
t/boolean#language.types.boolean.casting
As $z is converted to a boolean and exists, that works just the same way as
!empty().
---
Simon Welsh
Admin of http://simon.geek.nz/
Who said Microsoft never created a bug-free program? The blue screen never,
ever crashes!
http://www.thinkgeek.com/brain/
as late as it can
(when it matches a >)
---
Simon Welsh
Sent from my phone, excuse the brevity
On 19/02/2011, at 10:36, Tommy Pham wrote:
> Hi folks,
>
> This is not directly relating to PHP but it's Friday so I'm gonna give
> it a shot :). Would someone please hel
is used to sort arrays but
maintain the key association. The default search option should work fine for
you, if not try one of the other SORT_* flags described on the sort() manual
page.
---
Simon Welsh
Admin of http://simon.geek.nz/
Who said Microsoft never created a bug-free program? The
to?
>
>
>
> Roger Riordan AM
It's not complaining about a missing parameter, it's complaining about the lack
of a specified timezone.
This warning was introduced in PHP5.1, and you either need to set the
date.timezone INI setting, either in your php.ini or by using ini_se
Nope, that is the wrong colour'.
>>
>> Can anyone help?
>>
>> Cheers,
>>
>> Mark
>
> $regex = '/"([^"]+)"/';
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
Also, you'll want preg_match_all rather than preg
totime() (http://php.net/strtotime) and date() (http://php.net/date).
There's even a DATE_ISO8601 constant for the correct date format.
---
Simon Welsh
Admin of http://simon.geek.nz/
Who said Microsoft never created a bug-free program? The blue screen never,
ever crashes!
http://www.thi
an use stripos for case-insentive matching.
Using regex functions when you don't need the power is overkill and slower.
Your call to preg_match wasn't working because you need your search term first,
and it needs proper delimiters.
---
Simon Welsh
Admin of http://simon.geek
On 15/03/2011, at 9:18 PM, Joce Jovanov wrote:
> On Tue, Mar 15, 2011 at 12:44 AM, Simon J Welsh wrote:
>
>> On 15/03/2011, at 12:32 PM, Jordan wrote:
>>
>>> Hello Evrybody,
>>>
>>> Can i convert IETF format (ex: "Wed, 18 Oct 2009 13:00:00
if it has approved anywhere
> in the results string, then it should be approved and if the results is
> APPROVD without the E it shold be delined.
>
>
>
> Am I doing something wrong.
>
>
>
>
>
> Thanks!
>
> Jack
Yes, you're doing something wrong. s
ngs and nice Day/Evening
>Michelle Konzack
json_decode(file_get_contents('http://domain/file.json'));
If you need to do a POST rather than a GET, use curl and pass the output from
curl_exec() to json_decode().
---
Simon Welsh
Admin of http://simon.geek.nz/
Who said Microsoft never
quot;Timestamp for {$timezone} ";
> print "is {$remote_time->format("U")}";
>
> # Get the timestamp and create a date from it
> $timestamp = (int)$remote_time->format("U");
>
> # Show the formatted date created from timestamp
>
7;s, we can title this $listing, and we want 1 of them to be
>> returned, we should see something like:
>> randmember($listing)
>
> array_rand() - it's already built-in -
> http://php.net/manual/en/function.array-rand.php
>
> Scotty
Just note that array_rand() ret
> Dave.
I would use something simple like:
if(date('Y') == '2011') {
echo '2011';
} else {
echo '2011-', date('Y');
}
---
Simon Welsh
Admin of http://simon.geek.nz/
Who said Microsoft never created a bug-free program? The blue screen
mment that the "Sent from my iPad/iPhone" is
> inherently an apology.
>
>
>
> --
> Richard Quadling
> Twitter : EE : Zend : PHPDoc
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
The signature is inserted at the top. Refer back to the replies t
On 30/05/2011, at 9:02 AM, Jim Giner wrote:
> Perhaps someone can tell me what I'm doing wrong. I did some ( a lot)
> looking around for hints on this and here is what I have compiled. It
> doesn't work - just goes to a white, blank page and sits. I don't know if I
> need all the html parts
to me.
>
> is there anyone knows why and how to fix this problem?
In PHP 5, objects are always assigned by reference, you do not need to make it
explicit.
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
code thus far:
>
> http://www.perturb.org/tmp/tree.txt
>
> I can get one level of depth, but nothing more than that :(
I haven't looked that much into your code, but:
$children = find_children($id,$list);
$list is never defined.
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 23/06/2011, at 9:57 AM, Simon J Welsh wrote:
> On 23/06/2011, at 9:53 AM, Scott Baker wrote:
>
>> I have a bunch of records in a DB that look like
>>
>> id | parent_id
>> --
>> 1 | 4
>> 2 | 4
>> 3 | 2
>> 4 | 0
>> 5
On 23/06/2011, at 10:14 AM, Scott Baker wrote:
> On 06/22/2011 03:06 PM, Simon J Welsh wrote:
>> On further inspection, that's not the problem at all. The problem's around
>> assign_children($pid,$list,&$new);
>>
>> The previous line you defined $ne
use grey-listing. It temporarily rejects emails from servers it doesn't
recognise, which stops most spam but actual email gets through as they
(correctly) retry.
I also have a learning bayesian filter running in my mail client (Apple's
Mail), which handles the spam that gets through t
break;
> case is_numeric($v):
> echo "I think v is a number $v\n";
> break;
> }
> }
In both cases, $v is equivalent to false, so is_string(NULL) = false == NULL ==
$v, likewise for is_null($v);
You're most likely after switch(true) { … } rather than switch($v)
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
est regards,
> Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)
You're using $motoCols in your function, but have not defined it or passed it
as an argument.
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
1?
> Just asking.
>
> --
> With best regards from Ukraine,
> Andre
I'm assuming it has to do with the value, if not an array or object, being cast
as an array. Thus, non-false equivalent values get cast into an array of size 1:
int(1)
}
array(0) {
}
---
Simon Welsh
Admin of h
On 10/08/2011, at 1:10 PM, Frank Thynne wrote:
> To confuse me a bit further, I can't find a definitive list of the
> basic type names. For example, is it "integer" or "int"?
Both.
http://php.net/manual/en/language.types.type-juggling.php#language.types.typecastin
eturn value
(http://php.net/file_put_contents), you'll see that false is returned on
failure.
In this case, a warning makes more sense than throwing an exception anyway. A
warning can be ignored, either by changing the error_reporting level or using
the error control operator, whereas
umeric data is an optional sign, followed by one or more
digits (optionally containing a decimal point), followed by an optional
exponent. The exponent is an 'e' or 'E' followed by one or more digits."
If you don't want the string turned into a number using the documented method,
don't use it as one.
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 1/09/2011, at 8:43 PM, magic-...@damage.devloop.de wrote:
> Simon J Welsh writes:
>> On 1/09/2011, at 9:53 AM, magic-...@damage.devloop.de wrote:
>>> Am Mittwoch, 31. August 2011, 20:48:37 schrieb Shawn McKenzie:
>>>> On 08/31/2011 09:03 AM, magic-...@damage.de
alled on a different server?
>
> Can I download a precompile mysqli anywhere? The PHP version is 5.1.49
> as noted earlier.
>
> Thanks in Advance,
>
> Nick
You've only compiled in MySQLi. You also need to pass --with-mysql to
configure. As you can compile in MySQLi, yo
ue. You could simply use if(move_uploaded_file($filename,
$destination)), or if($move_uploaded_file).
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ply from action.php
> contain so much junk? I have a Windows installation of PHP and Apache.
>
> thanks,
> -Hanson
You saved action.php as a RTF file rather than a plain text file. Resave it as
a plain text file.
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>
> The syntax checker calls the first instance ofecho ‘’; saying
> unexpected >
>
> I’m at a loss to understand why...
>
> I’m using PHP 5.3.8 & PEAR 1.9.4 with MySQL 5.1.59 on Mac OS X 10.6.8.
>
> Any help appreciated.
>
> Cheers,
>
&
like $clean = array_map('mb_convert_encoding', $dirty_arr,
array_fill(0, count($dirty_arr), 'utf-16'), array_fill(0, count($dirty_arr),
'utf-8'));
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ring comparisons (which is what is happening here) are done left to right. so
it's comparing month, then day, then year. You could use a Ymd format or just
compare the values of strtotime().
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
d into phpinfo() but haven't found anything helpful, yet.
> Have I overlooked something or is there another way to identify the server?
php_uname('n'); http://php.net/php_uname
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
et() condition, but
> perhaps I don't have the syntax correct?
>
> Anyway,
> TIA for your comments.
>
> Donovan
>
>
>
>
> --
> D Brooke
function list_formvars($pmatch=null) {...
http://php.net/manual/en/functions.arguments.php#functions.arguments.default
ly rounds decimal values. You can use this to emulate
rounding to a near power of ten by dividing, rounding, then multiplying again.
i.e. echo "" . round(68500/1000) * 1000 . " ROUNDED";
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the timezone for your script using date_default_timezone_set()
http://php.net/manual/en/function.date-default-timezone-set.php
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
s trivial to be
more confusing and harder to read (thus worse code) than a goto. It is also
much easier to make a mistake, especially if you're expecting the catching to
happen outside of the validation function.
---
Simon Welsh
Admin of http://simon.geek.nz/
--
PHP General Mailing List (h
e it back to the JavaScript side.
>
> (I obviously don't expect to have parse errors show up in production, but
> having them nicely visible and logged during testing is useful)
>
> --
> Cheers -- Tim
This is expected. The error doesn't occur to the second file is incl
27;re PHP'ing that's worth
mentioning:*
---
Simon Welsh
Admin of http://simon.geek.nz/
Who said Microsoft never created a bug-free program? The blue screen
never, ever crashes!
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e
--
PHP General Mailing List (http://www.php.net/)
yellow pages
then click a profession like acupuncture ( radio button ) and chose a state
say carlifornia
then click the show list button
then you will find what is wrong,
any suggestion ?
let me know
Thanks for your help in advance
simon
--
PHP General Mailing List (http://www.php.net/)
To
Hi all,
i am also looking a person to maintain my website findhealer.com
with a monthly payment
thanks
simon
-Original Message-
From: Tian, Simon (Contractor) (DSCP)
Sent: Wednesday, October 22, 2003 2:22 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: '[EMAIL PROTECTED]'
S
current Cent OS distribution of EL, PHP Version 4.3.9 with,
of
course, GD support. Any suggestions would be most appreciated.
Thank you.
Simon
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
current Cent OS distribution of EL, PHP Version 4.3.9 with,
of
course, GD support. Any suggestions would be most appreciated.
Thank you.
Simon
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
27;m not concerned with image size but
rather
native resolution. Thanks again for taking the time.
Simon
[EMAIL PROTECTED]
"tedd" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >Good morning, folks.
>>
>>Can any one direct me to a snippet or sugg
n
inches
(As either exif_read_data() or getimagesize() will give me the dimensions in
pixels.) and just do the math.
Again, thanks for your help!
Simon
[EMAIL PROTECTED]
"tedd" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Simon:
>
>>Thank you for your respo
s at:
http://www.campden-main.com/~orchids/test/test_exif_2.php
Thanks to all and, until the next time, Take Care!
Simon
[EMAIL PROTECTED]
"- Edwin -" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi!
>
> On Thu, 16 Mar 2006 08:13:41 -0800
>
501 - 557 of 557 matches
Mail list logo