RE: [PHP] Sort by string length...

2004-12-21 Thread Michael Sims
Russell P Jones wrote: Any idea how to sort an array by string length? Use usort() in conjunction with a user defined function that compares the length of both strings using strlen(). If brevity at the (possible) expense of clarity is your thing, you can even use create_function() as your

Re: [PHP] OT Re: [PHP] can I compile php source

2004-12-21 Thread Jason Wong
On Wednesday 22 December 2004 04:51, Jason Barnett wrote: So, seriously, if you don't feel like helping or you don't believe that a message should be posted here because it's off topic or you don't believe that a question was phrased properly, wouldn't it be better for everyone if you just

Re: [PHP] Sort by string length...

2004-12-21 Thread Tom Rogers
Hi, Wednesday, December 22, 2004, 7:18:52 AM, you wrote: RPJ Any idea how to sort an array by string length? RPJ Russ Jones With a user defined sorting function something like this ?php function cmp($a, $b){ $x = strlen($a); $y = strlen($b); if ($x == $y) { return 0; } return

Re: [PHP] can I compile php source

2004-12-21 Thread Jason Wong
On Wednesday 22 December 2004 05:35, Matthew Sims wrote: You know, I bet that man is getting sick of eating fish all the time. You don't have to fish for fish, you can fish for old boots if you want a change in diet :-) Teach a man to shoot a cow... What and get mad cows disease? -- Jason

Re: [PHP] Re: How to set register_globals=off in the script?

2004-12-21 Thread Jason Wong
On Wednesday 22 December 2004 05:08, Jason Barnett wrote: Jerry Swanson wrote: So I want to keep PHP register_globals=on in php.ini, but in local files set to off? How I can do this? You can change this, and other php.ini directives, with the PHP function ini_set No you can't. Well

RE: [PHP] can I compile php source

2004-12-21 Thread Justin Palmer
[quote] On Wednesday 22 December 2004 01:37, Paul Aviles wrote: Guys, this is trivial. It takes the same effort to provide the answer to whoever this guy was, than to lecture him on how to think. Teach a person to fish ... -- Jason Wong - Gremlins Associates - www.gremlins.biz You know,

Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread Jason Wong
On Wednesday 22 December 2004 03:53, Richard Lynch wrote: ? can be caught by PHP as the end of PHP mode, no matter where you put it in a string or not. You can't be serious? Or have I misunderstood you? ?php echo '?php ?'; ? Works as expected, ie displays ?php ?. -- Jason Wong - Gremlins

Re: [PHP] can I compile php source

2004-12-21 Thread Bruce Douglas
now guys/ladies.. this was funny! and can we move on... ! -Original Message- From: Matthew Sims [EMAIL PROTECTED] Sent: Dec 21, 2004 1:35 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] can I compile php source On Wednesday 22 December 2004 01:37, Paul Aviles wrote: Guys, this is

Re: [PHP] Sort by string length...

2004-12-21 Thread Jason Wong
On Wednesday 22 December 2004 05:18, Russell P Jones wrote: Any idea how to sort an array by string length? usort(), strlen() -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development *

Re: [PHP] Sort by string length...

2004-12-21 Thread Chris
One of the Array sort functions? http://www.php.net/usort Russell P Jones wrote: Any idea how to sort an array by string length? Russ Jones -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Super newbie question....

2004-12-21 Thread GaryH
Hello all, Please see the simple php program below. It recieves input from an html file form that outputs a clients first name and then last name. My problem is this, I cannot figure out how to get a 'space' to print out between the first and last name Any advise or thoughts for this php

[PHP] Newbie, easy question...

2004-12-21 Thread GaryH
Below is a simple php file that recieves input from a form html file. The php file outputs the first and last name, but their is no space between the names. Does anyone know how I can get a space between name in the php file? TIA, Gary html head titleHi User/title /head body h3PHP program that

Re: Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread John Holmes
You will notice that the previous line also contains a '?' sequence, so I'm confused as to why this would die on one line but not the other? Or is this some freak combination of comments and PHP tags? :-o It is, I guess. ?php $a = ' ? '; $b = ' ? '; ? will work just fine. If you try

Re: [PHP] can I compile php source OT

2004-12-21 Thread Raditha Dissanayake
Danny Brow wrote: Wow I just wasted 10 minutes of my day reading half these post. This is one long thread. And man is it hard to follow. exactly why we don't want people posting off topic stuff here. Dan. -- Raditha Dissanayake.

Re: [PHP] help with coding #3

2004-12-21 Thread John Holmes
From: karl james [EMAIL PROTECTED] Ok I will try the links again, sorry about the hassel, Did I miss the first part of this message? http://www.theufl.com/movie_details.phps website http://www.theufl.com/php/wrox_php/movie_details.php Are you able to tshoot it and see whats going

Re: [PHP] Sort by string length...

2004-12-21 Thread ApexEleven
How about iterating though the strings and putting string values and lengths in an array: [begin untested code] $strings = array('i','am','who'); $string_count = array(); foreach ($strings as $string) { $string_count['value'][] = $string; $string_count['length'][] = strlen($string); }

[PHP] Re: Newbie, easy question...

2004-12-21 Thread Ben
Garyh wrote: Below is a simple php file that recieves input from a form html file. The php file outputs the first and last name, but their is no space between the names. Does anyone know how I can get a space between name in the php file? As a minimum this will work: ? print(p$fusername.

Re: [PHP] Sort by string length...

2004-12-21 Thread tg-php
Is it an associative array? That is, are you assigning values like this: Method 1: $arr[] = some text string; or $arr = array(some text string,some text string too); or like this... Method 2: $arr[value1] = some text string; or $arr1 = array(value1=some text string,value2=some text string

Re: [PHP] Sort by string length...

2004-12-21 Thread David Otton
On Tue, 21 Dec 2004 16:18:52 -0500 (EST), you wrote: Any idea how to sort an array by string length? You write a function that compares two strings (A and B), and returns 0 if len(A) == len(B), -1 if len(A) len(B) or +1 if len(A) len(B). function compare_by_length ($a, $b) { $la = strlen

[PHP] No input file specified. error.

2004-12-21 Thread Francisco Javier Escoppinichi Fernandez
Hello people. I got a little problem here, and I already searched on Google for possible solutions, but I still can't figure how to fix it. I'm developing a CMS Application on PHP. On my dev machine I'm running Apache 1.3.33 + PHP 4.3.9 as a module, and on my production machine i'm running Apache

Re: [PHP] can I compile php source

2004-12-21 Thread Darren Wheatley
I can't believe you can spend so much energy on this flame/agrovated response crap when a small amount of that energy would have simply answered this guys question. No wonder there is so much war. Mostly started by people who know how to be self sufficient. Don't worry. In 100 years we will all

Re: [PHP] Re: Encryption

2004-12-21 Thread Darren Wheatley
Richard, Thanks for your help. The code (as I mentioned) was not mine. I did however find the example from the link you sent me to and followed that. It works quite well. Again, thanks for your time. Darren Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have

[PHP] layers

2004-12-21 Thread Brad Ciszewski
The problem I am having doesn't exactly use PHP but, if you guys would help me out anyways, I would be very greatful. Problem: I am using an image for the layout of the website. The image is centered. I am trying to use a layer for the spots where content needs to be added. However, depending on

Re: [PHP] Super newbie question....

2004-12-21 Thread Lars B. Jensen
First of all, use ?php than ?, just get used to it now rather than get pissed later when it isnt a habit yet Second, you dont need the two lines, write the following to get the space ?php echo $fusername.' '.$lusername; ? And you should have your nicely formatted name right there ? print

Re: [PHP] OT Re: [PHP] can I compile php source

2004-12-21 Thread John Nichel
John Holmes wrote: From: Larry E. Ullman [EMAIL PROTECTED] Do you honestly think people are learning __anything__ when you reply with a Yes? Yes. You used to be so nice and polite. ;) -- By-Tor.com ...it's all about the Rush http://www.by-tor.com -- PHP General Mailing List

Re: [PHP] can I compile php source

2004-12-21 Thread John Nichel
Justin Palmer wrote: snip Not to start flame war about meat, but: Do people still eat beef? Yuk. Teach a man to pick soy beans... :) -- much healthier alternative... (Da** I told myself not to post on this thread, thanks Matthew ;) ) Those poor defenseless soy beans. ;) -- By-Tor.com ...it's all

[PHP] Re: curl CUSTOMREQUEST

2004-12-21 Thread Manuel Lemos
Hello, on 12/21/2004 05:10 PM Juan Nin said the following: I saw a post at http://www.php.net/manual/en/ref.curl.php where it says: Using the customrequest for a complete post is wrong. Libcurl will add a partial url, the http version and the standard headers after the post data - while this works

Re: [PHP] Accessing a Char in an Array

2004-12-21 Thread Curt Zirzow
* Thus wrote Justin Palmer: In an earlier thread labeled first letter, it was suggested that substr() be used. Just for the record the usage of $str = 'a string'; $str[0]; Is strongly discouraged, it is recommended to use: $str{0}; See Section (String access and modification by

Re: [PHP] No input file specified. error.

2004-12-21 Thread Curt Zirzow
* Thus wrote Francisco Javier Escoppinichi Fernandez: Hello people. I got a little problem here, and I already searched on Google for possible solutions, but I still can't figure how to fix it. I'm developing a CMS Application on PHP. On my dev machine I'm running Apache 1.3.33 + PHP

Re: [PHP] Setting or Getting Relative Path for PHP Includes

2004-12-21 Thread Curt Zirzow
* Thus wrote Anthony Baker: Hey Folks, Hoping someone can aid me with a newbie-ish question. I often use PHP includes in my files to pull in assets, but I hard code the relative path to the root html directory for the sites that I'm working on in each file. Example below: ?php

Re: [PHP] No input file specified. error.

2004-12-21 Thread Francisco Javier Escoppinichi Fernandez
Hi Curt, * Thus wrote Francisco Javier Escoppinichi Fernandez: Hello people. I got a little problem here, and I already searched on Google for possible solutions, but I still can't figure how to fix it. I'm developing a CMS Application on PHP. On my dev machine I'm running Apache 1.3.33 + PHP

Re: [PHP] No input file specified. error.

2004-12-21 Thread Curt Zirzow
* Thus wrote Francisco Javier Escoppinichi Fernandez: Hi Curt, * Thus wrote Francisco Javier Escoppinichi Fernandez: Hello people. I got a little problem here, and I already searched on Google for possible solutions, but I still can't figure how to fix it. I'm developing a CMS

Re: [PHP] layers

2004-12-21 Thread Jussi Mkil
I think i had a similar kind of problem as you described here. I used a layer as a container for the other layers that had the content in them. Then i just centered the container and used absolute positionings on the inner layers. The simplified code might look something like this: html head

[PHP] PHP and Post Data

2004-12-21 Thread Shane Mc Cormack
Hi I'm trying to integrate PHP Support into a basic webserver i am creating for personal use (Windows). However i've run into a problem. I've got the _GET vars working, (using the QUERY_STRING Environment Variable), yet i can't figure out how to get the _POST vars set. my webserver has the

Re: [PHP] PHP and Post Data

2004-12-21 Thread John Nichel
Shane Mc Cormack wrote: Hi I'm trying to integrate PHP Support into a basic webserver i am creating for personal use (Windows). However i've run into a problem. I've got the _GET vars working, (using the QUERY_STRING Environment Variable), yet i can't figure out how to get the _POST vars set.

Re: [PHP] PHP and Post Data

2004-12-21 Thread Shane Mc Cormack
That works on a normal webserver yes. However, I am programming my own, and I have the Posted Data stored in the memory of the webserver, and when i execute the PHP.exe i need to tell it what the PostData is somehow. - Shane John Nichel wrote: Shane Mc Cormack wrote: Hi I'm trying to integrate

FW: [PHP] Accessing a Char in an Array

2004-12-21 Thread Justin Palmer
*Sorry Curt for sending this to you.* Hi, Well if any one is interested in the speed I set up an example that you can go to. Though, when I run the example substr() is very neurotic (or it seems that it is to me). It can process the same line of code at a lot of different intervals, while

Re: FW: [PHP] Accessing a Char in an Array

2004-12-21 Thread Robert Cummings
On Tue, 2004-12-21 at 23:47, Justin Palmer wrote: *Sorry Curt for sending this to you.* Hi, Well if any one is interested in the speed I set up an example that you can go to. Though, when I run the example substr() is very neurotic (or it seems that it is to me). It can process the same

Re: [PHP] No input file specified. error.

2004-12-21 Thread Francisco Javier Escoppinichi Fernandez
Curt Zirzow escribió: * Thus wrote Francisco Javier Escoppinichi Fernandez: Hi Curt, * Thus wrote Francisco Javier Escoppinichi Fernandez: Hello people. I got a little problem here, and I already searched on Google for possible solutions, but I still can't figure how to fix it. I'm developing a

RE: FW: [PHP] Accessing a Char in an Array

2004-12-21 Thread Justin Palmer
Why is substr all over the board in how fast it processes the same string? Is it the server? Kind regards, Justin -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 8:58 PM To: [EMAIL PROTECTED] Cc: PHP-General; 'Curt Zirzow'

Re: [PHP] PHP and Post Data

2004-12-21 Thread Travis Conway
Why reinvent the wheel by writing your own webserver? Apache allows for it to be used within other products. Just redistrbute it according to the license. - Original Message - From: Shane Mc Cormack [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 10:36 PM

Re: [PHP] PHP and Post Data

2004-12-21 Thread Shane Mc Cormack
I have my own reasons for wanting to write my own webserver, but thats not the point here. I just need/want to know how to tell the PHP.exe what the POST variables are. - Shane Travis Conway wrote: Why reinvent the wheel by writing your own webserver? Apache allows for it to be used within

Re: FW: [PHP] Accessing a Char in an Array

2004-12-21 Thread Curt Zirzow
* Thus wrote Justin Palmer: Why is substr all over the board in how fast it processes the same string? Is it the server? Benchmarking can be a funny thing. Usually benchmarks take an average of serveral thousand iterations in order to find the average time it take something to do.

<    1   2