Re: [PHP] Is it Possible?

2005-02-04 Thread Martin Holm
Sagar C Nannapaneni wrote: I'm calling a php script with img tag for ex: img src=http://localhost/test.php?img=asfd; and the test.php is as follows... test.php ? ... ... some server side validations ... readfile(abcd.gif); ? --- Theres no

Re: [PHP] splitting string into array

2004-09-29 Thread Martin Holm
blackwater dev wrote: How can I take a string and create an array? Example, A12B05C45D34 I need to split this into chunks of three A12,B05,C45..etc? Thanks! | use str_split() if you dont have php5, you can use the following code: | ?php if (!function_exists('str_split')) { function

Re: [PHP] HTML button as hyperlink

2004-11-18 Thread Martin Holm
Mulley, Nikhil wrote: Hi All, My Question is that , I have an HTML page , how can I make it as Hyperlink instead of a Form Button When user clicks on that button , it must be a href link . Please guide me. Thanks, Nikhil. . first of all, i dont see anything regarding php in this question. form

Re: [PHP] GD functions don't delete temporary files

2004-12-13 Thread Martin Holm
Steve wrote: I am using GD image function with PHP (PHP 4.3.9 on RedHat 9). Today I found that for all images I have created so far (using the ImageGIF() function), there is a temporary file in /tmp with that image. The name of the temp file is a 6 character combination of letters and digits,

[PHP] stdin buffering

2004-09-09 Thread Martin Holm
I'm currently working on some stuff with php-cli and got a few problem. I want to be able to read one single character from stdin via keyboard, ie. pressing a button. It works fine if I use enter as newline afterwards, but I would like to do it without pressing enter. Thus, I have to turn off

Re: [PHP] stdin buffering

2004-09-09 Thread Martin Holm
Greg Donald wrote: On Thu, 2004-09-09 at 15:25, Jim Grill wrote: exec(stty -icanon min 0 time 0); Nice. I suspect 'phpSnake' will appear on freshmeat in a couple days. :) thats more or less what we are trying to do. =) pong as a start at least. doing it all over again, this time

Re: [PHP] Splitting 12345 - 1,2,3,4,5

2004-09-16 Thread Martin Holm
Michael Mao wrote: Thanks John. Found what I'm looking for: Function str_split() to make it php4 compatible you can use this function: |?php if (!function_exists('str_split')) { function str_split ($str, $size = 1) { $arr = array(); for ($i = 0 ; $i strlen($str) ; $i += $size) {

Re: [PHP] Highest Key in an Array

2004-09-17 Thread Martin Holm
Daniel Schierbeck wrote: I've been looking at php.net, but i couldn't find what i'm searching for. I have a numeric array, and i'd like to get the highest key. E.g. $arr = array(3 = foo, 7 = bar, 43 = foobar); What i want is a function that, in this case, returns 43. Daniel Schierbeck $arr =