Re: [PHP] variable type - conversion/checking

2013-03-15 Thread tamouse mailing lists
On Fri, Mar 15, 2013 at 8:34 PM, Ashley Sheridan wrote: >>> > On Thu, Mar 14, 2013 at 7:02 PM, >>georg >>> >>> I have tried to find a way to check if a character string is >>> >>> possible to >>> >>> test whether it is convertible to an intger ! > The op wasn't about casting a str

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Matijn Woudt
On Sat, Mar 16, 2013 at 2:54 AM, Sebastian Krebs wrote: > 2013/3/16 Andrew Ballard > > > I suppose one could try something like this: > > > > if (is_string($val) && $val === (string)(int)$val) > > > > If $val is an integer masquerading as a string, it should be identical to > > the original

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Andrew Ballard
> Guess regex are the only useful solution here. When you consider to use > built-in functions, just remember, that for example '0xAF' is an integer > too, but '42.00' isn't. Shoot...I hadn't considered how PHP might handle hex or octal strings when casting to int. (Again, not in front of a comput

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Andrew Ballard
On Mar 15, 2013 9:54 PM, "Sebastian Krebs" wrote: > > 2013/3/16 Andrew Ballard >> >> I suppose one could try something like this: >> >> if (is_string($val) && $val === (string)(int)$val) >> >> If $val is an integer masquerading as a string, it should be identical to >> the original string wh

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Sebastian Krebs
2013/3/16 Andrew Ballard > I suppose one could try something like this: > > if (is_string($val) && $val === (string)(int)$val) > > If $val is an integer masquerading as a string, it should be identical to > the original string when cast back to a string, shouldn't it? (I can't try > it right

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Sebastian Krebs
2013/3/16 Ashley Sheridan > > > tamouse mailing lists wrote: > > >On Fri, Mar 15, 2013 at 4:00 PM, Ashley Sheridan > >wrote: > > > >> ** > >> On Fri, 2013-03-15 at 04:57 -0500, tamouse mailing lists wrote: > >> > >> On Fri, Mar 15, 2013 at 3:55 AM, Peter Ford > >wrote: > >> > On 15/03/13 06:21,

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Andrew Ballard
I suppose one could try something like this: if (is_string($val) && $val === (string)(int)$val) If $val is an integer masquerading as a string, it should be identical to the original string when cast back to a string, shouldn't it? (I can't try it right now.) Andrew

Re: [PHP] PHP context editor

2013-03-15 Thread curtis
Sent from my Galaxy S®III Original message From: Ashley Sheridan Date: 03/15/2013 5:03 PM (GMT-05:00) To: Sebastian Krebs Cc: gei...@b1-systems.de,georg ,PHP General List Subject: Re: [PHP] PHP context editor On Fri, 2013-03-15 at 12:05 +0100, Sebastian Krebs wrot

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Ashley Sheridan
tamouse mailing lists wrote: >On Fri, Mar 15, 2013 at 4:00 PM, Ashley Sheridan >wrote: > >> ** >> On Fri, 2013-03-15 at 04:57 -0500, tamouse mailing lists wrote: >> >> On Fri, Mar 15, 2013 at 3:55 AM, Peter Ford >wrote: >> > On 15/03/13 06:21, Jim Lucas wrote: >> >> >> >> On 3/14/2013 4:05 PM,

Re: [PHP] PHP context editor

2013-03-15 Thread Curtis Maurand
I've been playing with bluefish as of late. The openoffice folks have taken over that project. tamouse mailing lists wrote: >On Fri, Mar 15, 2013 at 4:03 PM, Ashley Sheridan > wrote: >> On Fri, 2013-03-15 at 12:05 +0100, Sebastian Krebs wrote: >> >>> 2013/3/15 Karim Geiger >>> >>> > Hi Geor

Re: [PHP] rather a HTML Q; however 2-FRAME

2013-03-15 Thread tamouse mailing lists
On Fri, Mar 15, 2013 at 10:36 AM, Jim Giner wrote: > On 3/15/2013 10:11 AM, georg wrote: >> >> Actually I think you are right; >> >> what I would have liked (as a natural extension of the depression:) >> is actually a tag that stands without the >> and which as target="framename" instead of

Re: [PHP] PHP context editor

2013-03-15 Thread tamouse mailing lists
On Fri, Mar 15, 2013 at 4:03 PM, Ashley Sheridan wrote: > On Fri, 2013-03-15 at 12:05 +0100, Sebastian Krebs wrote: > >> 2013/3/15 Karim Geiger >> >> > Hi Georg, >> > >> > On Thu, 2013-03-14 at 23:10 +0100, georg wrote: >> > > hello, >> > > annyone knows of some good PHP context editor freeware ?

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread tamouse mailing lists
On Fri, Mar 15, 2013 at 4:00 PM, Ashley Sheridan wrote: > ** > On Fri, 2013-03-15 at 04:57 -0500, tamouse mailing lists wrote: > > On Fri, Mar 15, 2013 at 3:55 AM, Peter Ford wrote: > > On 15/03/13 06:21, Jim Lucas wrote: > >> > >> On 3/14/2013 4:05 PM, Matijn Woudt wrote: > >>> > >>> On Thu, Mar

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Jim Lucas
On 03/15/2013 02:33 PM, richard gray wrote: On 15/03/2013 22:00, Ashley Sheridan wrote: On Fri, 2013-03-15 at 04:57 -0500, tamouse mailing lists wrote: For my money, `is_numeric()` does just what I want. The thing is, is_numeric() will not check if a string is a valid int, but any valid numb

Re: [PHP] PDO Transaction

2013-03-15 Thread Lester Caine
Simon Dániel wrote: Hi, I have a trouble with PDO transactions. I would like to start using transactions, but I am not familiar with it. I have got a 'There is no active transaction' exception, however, I am using beginTransaction method, and also I have set PDO::ATTR_AUTOCOMMIT to false right

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread richard gray
On 15/03/2013 22:00, Ashley Sheridan wrote: On Fri, 2013-03-15 at 04:57 -0500, tamouse mailing lists wrote: For my money, `is_numeric()` does just what I want. The thing is, is_numeric() will not check if a string is a valid int, but any valid number, including a float. For something like th

Re: FW: [PHP] Accessing Files Outside the Web Root

2013-03-15 Thread Ashley Sheridan
On Fri, 2013-03-15 at 09:11 -0400, Dale H. Cook wrote: > At 09:44 PM 3/14/2013, tamouse mailing lists wrote: > > >If you are delivering files to a (human) user via their browser, by whatever > >mechanism, that means someone can write a script to scrape them. > > That script, however, would have

Re: [PHP] PHP context editor

2013-03-15 Thread Ashley Sheridan
On Fri, 2013-03-15 at 12:05 +0100, Sebastian Krebs wrote: > 2013/3/15 Karim Geiger > > > Hi Georg, > > > > On Thu, 2013-03-14 at 23:10 +0100, georg wrote: > > > hello, > > > annyone knows of some good PHP context editor freeware ? > > > (tired of missing out on trivials like ; ) > > > > I don't

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Ashley Sheridan
On Fri, 2013-03-15 at 04:57 -0500, tamouse mailing lists wrote: > On Fri, Mar 15, 2013 at 3:55 AM, Peter Ford wrote: > > On 15/03/13 06:21, Jim Lucas wrote: > >> > >> On 3/14/2013 4:05 PM, Matijn Woudt wrote: > >>> > >>> On Thu, Mar 14, 2013 at 11:44 PM, Jim Lucas wrote: > >>> > On 03/14/20

[PHP] PDO Transaction

2013-03-15 Thread Simon Dániel
Hi, I have a trouble with PDO transactions. I would like to start using transactions, but I am not familiar with it. I have got a 'There is no active transaction' exception, however, I am using beginTransaction method, and also I have set PDO::ATTR_AUTOCOMMIT to false right after connecting to th

Re: [PHP] Accessing Files Outside the Web Root

2013-03-15 Thread Dale H. Cook
At 09:27 AM 3/15/2013, Stuart Dallas wrote: >You'll have to pursue legal avenues to prevent it being made available, and >that's usually prohibitively expensive. Not necessarily. Most of the host systems for the scraper sites are responsive to my complaints. Even if a site owner will not respon

Re: [PHP] rather a HTML Q; however 2-FRAME

2013-03-15 Thread Jim Giner
On 3/15/2013 10:11 AM, georg wrote: Actually I think you are right; what I would have liked (as a natural extension of the depression:) is actually a tag that stands without the and which as target="framename" instead of the frame defining name="framename" and which just displayed the src

Re: [PHP] rather a HTML Q; however 2-FRAME

2013-03-15 Thread tamouse mailing lists
On Fri, Mar 15, 2013 at 9:11 AM, georg wrote: > Actually I think you are right; > > what I would have liked (as a natural extension of the depression:) > is actually a tag that stands without the > and which as target="framename" instead of the frame defining > name="framename" > and which j

Re: [PHP] Undefined index....

2013-03-15 Thread Jay Blanchard
[snip] function includeXML($file, $locale, $url, $level = 1) { // stuff $xml = ''; Should work here ... Since the call below is ADDING to $xml you do need something existing to add to so what does that give? [/snip] Thanks Lester, that worked. I had just put that in the wrong place. *s

[PHP] Re: Undefined index....

2013-03-15 Thread Tim Streater
On 15 Mar 2013 at 13:10, Jay Blanchard wrote: > I have inherited a mess of a home-grown PHP framework that literally > fills the error_log with 100's of thousands of messages each day. First > order of business was rotating the logs, now we are working through each > error to solve them. This i

Re: [PHP] rather a HTML Q; however 2-FRAME

2013-03-15 Thread georg
Actually I think you are right; what I would have liked (as a natural extension of the depression:) is actually a tag that stands without the and which as target="framename" instead of the frame defining name="framename" and which just displayed the src in that frame (immediatly as it doe

Re: [PHP] rather a HTML Q; however 2-FRAME

2013-03-15 Thread Stuart Dallas
On 15 Mar 2013, at 13:34, "georg" wrote: > To make things clearer. I already have the frames since earlier and > want to fill then again, so it is not at the "initial filling" of the frames > at "creation". You want one action to change the content in two frames? For that you'll need to use Jav

Re: [PHP] rather a HTML Q; however 2-FRAME

2013-03-15 Thread georg
To make things clearer. I already have the frames since earlier and want to fill then again, so it is not at the "initial filling" of the frames at "creation". BR georg - Original Message - From: "georg" To: "tamouse mailing lists" Cc: Sent: Friday, March 15, 2013 2:31 PM Subject: Re

Re: [PHP] rather a HTML Q; however 2-FRAME

2013-03-15 Thread georg
Hi, yepp & thnx, so far I have got, but now im in a situation where I have made 2nice frames one contining the picture (noscroll) and i want to have a quite narrow frame at the side displaying a text, however I want to fill both frames at one mouseclick... here Im utterly failing :( for so

Re: [PHP] Accessing Files Outside the Web Root

2013-03-15 Thread Stuart Dallas
On 15 Mar 2013, at 13:11, "Dale H. Cook" wrote: > At 09:44 PM 3/14/2013, tamouse mailing lists wrote: > >> If you are delivering files to a (human) user via their browser, by whatever >> mechanism, that means someone can write a script to scrape them. > > That script, however, would have to be

Re: [PHP] Undefined index....

2013-03-15 Thread Lester Caine
Jay Blanchard wrote: I have inherited a mess of a home-grown PHP framework that literally fills the error_log with 100's of thousands of messages each day. First order of business was rotating the logs, now we are working through each error to solve them. This is a fairly basic error, but I for t

Re: [PHP] Undefined index....

2013-03-15 Thread Serge Fonville
So basically, $xml is out of scope for this function and you are appending to a nonexisting variable? Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/fee

Re: [PHP] Undefined index....

2013-03-15 Thread Jay Blanchard
[snip] Two questions: Where is $xml defined and where is $pos defined? [/snip] $xml is defined in other functions, just not in this function. $pos is irrelevant to the question - it is just the string position within the file. -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] Undefined index....

2013-03-15 Thread Serge Fonville
Hi, Two questions: Where is $xml defined and where is $pos defined? HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncat

Re: FW: [PHP] Accessing Files Outside the Web Root

2013-03-15 Thread Dale H. Cook
At 09:44 PM 3/14/2013, tamouse mailing lists wrote: >If you are delivering files to a (human) user via their browser, by whatever >mechanism, that means someone can write a script to scrape them. That script, however, would have to be running on my host system in order to access the script whic

[PHP] Undefined index....

2013-03-15 Thread Jay Blanchard
I have inherited a mess of a home-grown PHP framework that literally fills the error_log with 100's of thousands of messages each day. First order of business was rotating the logs, now we are working through each error to solve them. This is a fairly basic error, but I for the life of me canno

[PHP] Re: rather a HTML Q; however 2-FRAME

2013-03-15 Thread Tim Streater
On 15 Mar 2013 at 11:00, tamouse mailing lists wrote: > Frames are not only deprecated, they are unsupported entirely in HTML5 > (not that browsers won't continue to display them; just that they > won't validate). Meaning, in other words, that they *are* supported. It's unlikely in any case th

Re: [PHP] PHP context editor

2013-03-15 Thread Sebastian Krebs
2013/3/15 Karim Geiger > Hi Georg, > > On Thu, 2013-03-14 at 23:10 +0100, georg wrote: > > hello, > > annyone knows of some good PHP context editor freeware ? > > (tired of missing out on trivials like ; ) > > I don't know exactly what you mean by a context editor but if you want > an editor with

Re: [PHP] Type of a variable in PHP

2013-03-15 Thread Sebastian Krebs
2013/3/15 Kevin Peterson > Have two questions - > 1. How to find type of a variable in PHP. > gettype(), or one of the is_*()-functions. But for me more interesting for me: Why do you _need_ this? > 2. How to find the type of an array in PHP. > An array is of type array :) is_array() or again

Re: [PHP] rather a HTML Q; however 2-FRAME

2013-03-15 Thread tamouse mailing lists
On Fri, Mar 15, 2013 at 5:00 AM, georg wrote: > I have a need to make a pure "display" in a (HTML tagged area defined by) > FRAME > now so far I have only succeeded in making output into a frame by landing > a clicked tag to open the new doc (href or src) in a specified frame. > Possibly its not

Re: [PHP] Type of a variable in PHP

2013-03-15 Thread Lester Caine
Karim Geiger wrote: Have two questions - >1. How to find type of a variable in PHP. >2. How to find the type of an array in PHP. > >Please help. > Use this: http://php.net/manual/en/function.gettype.php BUT - bear in mind that the nice thing about PHP 'arrays' is that they are a not restricte

Re: [PHP] PHP context editor

2013-03-15 Thread Karim Geiger
Hi Georg, On Thu, 2013-03-14 at 23:10 +0100, georg wrote: > hello, > annyone knows of some good PHP context editor freeware ? > (tired of missing out on trivials like ; ) I don't know exactly what you mean by a context editor but if you want an editor with syntax highlighting try eclipse for an c

[PHP] rather a HTML Q; however 2-FRAME

2013-03-15 Thread georg
I have a need to make a pure "display" in a (HTML tagged area defined by) FRAME now so far I have only succeeded in making output into a frame by landing a clicked tag to open the new doc (href or src) in a specified frame. Possibly its not solvable with framework of frames. ( I know, FRAMEs are a

Re: [PHP] Type of a variable in PHP

2013-03-15 Thread Karim Geiger
Hi, On Fri, 2013-03-15 at 09:55 +, Kevin Peterson wrote: > Have two questions - > 1. How to find type of a variable in PHP. > 2. How to find the type of an array in PHP. > > Please help. > Use this: http://php.net/manual/en/function.gettype.php Regards Karim -- Karim Geiger B1 Systems

[PHP] Type of a variable in PHP

2013-03-15 Thread Kevin Peterson
Have two questions - 1. How to find type of a variable in PHP. 2. How to find the type of an array in PHP. Please help.

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Peter Ford
On 15/03/13 06:21, Jim Lucas wrote: On 3/14/2013 4:05 PM, Matijn Woudt wrote: On Thu, Mar 14, 2013 at 11:44 PM, Jim Lucas wrote: On 03/14/2013 11:50 AM, Samuel Lopes Grigolato wrote: Something like "if (is_numeric($var)&& $var == floor($var))" will do the trick. I don't know if there's a b