RE: [PHP] LDAP and Single Sign On MORE THOUGHTS
[snip] I've got a bit lost on this, but assuming that we are talking about an intranet enviornment, with windows/IE6 clients, and apache servers, then personally: I would check logins based on a valid session. If the user doesn't have a session they aren't logged in. Store the username in the session variable. PHP session variables are AFAIK designed to be hard to detect and fake. Any code that is run under a http:// website ( as opposed to an ssl or https:// one ), reads the session(ie does not write to it). Any authentication should be done using a script accessed over https, protected by mod_auth_kerb. The http:// script would be accessed by the person when they first access the protected site. The protected site would detect that the user is not logged in, and redirect them to the authentication site(which is behind mod_auth_kerb, and https), which would create the session, and redirect the user back, to the page where they originally tried to access. [/snip] The question here is how does a Windows login create a valid session? We cannot really have the login script create a PHP session, can we?
RE: [PHP] need a help to connect php to sql server . thanks admin.
[snip] can someone send me a tutorial for how to connect my dynamic page to sql server? may sql server 2000. i'm a college student and need learn more about php. thanks admin.. [/snip] To learn more about PHP start with the manual -- http://www.php.net/odbc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hidding HTML Input Elements values approach
[snip] I would like some feedback on this approach for encrypting HTML input element values such as Checkbox, Radio, Select, Hidden, etc, and Javascript code related to those elements. [/snip] I don't see any problem with the approach, but I would ask why... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] LDAP and Single Sign On MORE THOUGHTS
[snip] We are sitting here having a discussion on login techniques and I cam up with a thought...why not have a login script write a cookie that then coulod be read by PHP and compared against the AD via LDAP? Does anyone see any gotcha's with that kind of process? Couldn't I write my own cookie to fool the authentication into thinking I'm somebody else? [/snip] I suppose that you could do that if you were savvy enough to realize that automatic login to the intranet used a cookie for authentication and you knew how to format the cookie and properly hash a checksum stored in the cookie. The user information stored in the cookie would be verified against the AD via LDAP. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] LDAP and Single Sign On MORE THOUGHTS
[snip] First, let me apologize for having to take it to a basic level. I'll admit that I'm fairly new to web development, but this is something I could *really* use at work and I want to make sure I understand (just to set the stage, we use Windows/Active Directory/MS SQL Server at work, but have decided that future applications will be written in PHP run on Linux/Apache). So I have a login script that sets a cookie when the user logs in. Then I have an application written in PHP that reads the cookie for authentication purposes. What would I store in the cookie? Would the username be sufficient (since the cookie was set, we can assume that it was already authenticated through AD, right), or is there something more I can add to the cookie to make the process more secure? Which leads back to my original question; what would keep me from setting a cookie with, say, my manager's username, fooling the PHP application into thinking I'm her? [/snip] You could just store a username, since they have already authenticated, but a cookie with just a username would be easy to duplicate. My current thought is to hash a checksum of some sort and storing that in the cookie as well. That way you avoid the username only problem. I do not want to store the users password in any format in the cookie. I am thinking that the login script will cause a cookie to be written (via PHP) with a base64 encoded (http://www.php.net/manual/en/function.base64-encode.php) string or some other hash method. Then that string could be decoded when the user accesses the intranet site and compared against whatever criteria you deem necessary. I have not tested this though. It is on my task list for next week though. :) So, you could set a cookie with your manager's name, but it wouldn't work. You would also have to know how to encode a string properly for storage in the cookie. Read http://www.php.net/manual/en/function.setcookie.php for more information on cookies. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] .DAT file with PHP
[snip] I want to use PHP to show the contents of the DAT from back to front. HOw do I do that? [/snip] Open the file, read it into an array, read the array backwards and close the file. Start with http://www.php.net/fopen and http://www.php.net/array they are both in the manual. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] .DAT file with PHP
[snip] Sorry im new but, how do we read from a file to an array? I've studied C but not with PHP and it's not working for me... Suggestions? [/snip] First, read and understand, as much as possible, TFM. It should go something like this $foo = fopen(my.dat, r); while(!feof($foo)){ $bar = fgets($foo, 4096); // gets a line hopefully $glorp[] = $bar; // places line in array } Once you have done this look at http://www.php.net/array for all of the things that you can do with the $glorp array -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Calling Curt Z, Curt Z to the white courtesy phone please
Sorry for the post listites, I have lost Curt Z's info and need him to contact me. More to the point, can you post the Newbie Guide that you revamped so well? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Zoomable map
I have been searching for this, but maybe one of you has seen it before and can save me some time. I need a class that will allow me to create a zoomable map application. I have a map, I just need folks to be able to zoom and scroll,etc. TIA! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Calling Curt Z, Curt Z to the white courtesy phone please
[snip] You mean this? :) http://zirzow.dyndns.org/php-general/NEWBIE It might need some rewording and a few tweeks here and there. It is almost turning more into a php-general charter. For those wanting to know the original: http://zirzow.dyndns.org/php-general/NEWBIE.orig [/snip] Yes, that is what I was looking for. Thanks Curt! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Zoomable map
[snip] I have been searching for this, but maybe one of you has seen it before and can save me some time. I need a class that will allow me to create a zoomable map application. I have a map, I just need folks to be able to zoom and scroll,etc. TIA! http://script.aculo.us/ might have what you need... [/snip] No zoomable maps here, a bunch of Ajax and Javascript stuff though. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Zoomable map
[snip] http://script.aculo.us/ might have what you need... [/snip] No zoomable maps here, a bunch of Ajax and Javascript stuff though. Right. If you have a map, this will give you tools to zoom and scroll... [/snip] Really, I did not see those tools. I must not have looked closely enough. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LDAP - The Adventure Continues
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 94 bytes) in /srv/www/htdocs/test/ldapTest.php on line 47 47 - $info = ldap_get_entries($ds, $sr); $sr=ldap_search($ds, dc=foo,dc=local, cn=*); $ds is the connection to the LDAP server Does anyone know what this means? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] LDAP - The Adventure Continues SOLVED
[snip] Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 94 bytes) in /srv/www/htdocs/test/ldapTest.php on line 47 47 - $info = ldap_get_entries($ds, $sr); $sr=ldap_search($ds, dc=foo,dc=local, cn=*); $ds is the connection to the LDAP server Does anyone know what this means? [/snip] The php.ini still had an 8mb memory limit set. I increased the amount and all is well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] max unique number
[snip] How do i get a unique max number from a mysql table column? [/snip] SELECT MAX(number) FROM table LIMIT 1; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] LDAP and Single Sign On
[snip] We are developing an intranet for my company. I would like to implement a single sign on service. We have Active Directory on one server and the intranet is being housed on a Redhat Linux server. When the internal user pulls up the intranet, I would like it to check to see if they successfully joined the domain when they logged into their personal machine, if so they do not need to log on to the intranet. Does anybody have any links to tutorials on this? Thanks! [/snip] Just to be clear, you want to take the network logon (from the Windows environment) and compare it against the AD via LDAP when someone accesses the intranet to make sure that they are authorized? I don't think that it is possible; it is a question that I have asked before. I have seen this sort of behavior before; when all of the boxes were Windows boxes (IIS web servers, etc). As far as I can tell you will have to ask the user to login at the web application level again, but you can verify it against your AD via LDAP with the basic stuff from http://www.php.net/ldap -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] LDAP and Single Sign On MORE THOUGHTS
[snip] As far as I can tell you will have to ask the user to login at the web application level again, but you can verify it against your AD via LDAP with the basic stuff from http://www.php.net/ldap [/snip] We are sitting here having a discussion on login techniques and I cam up with a thought...why not have a login script write a cookie that then coulod be read by PHP and compared against the AD via LDAP? Does anyone see any gotcha's with that kind of process? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mysql Rows
[snip] You must have a column that is sequential in some way. An auto-incremented column, timestamp, or some other device that will allow you to step through regardless of gaps in sequence. If you do not have such a column then you could add one. You see, now that's the problem. If you have a field that has auto-increment and then delete a record, auto-increment does not go back and fill up the gaps. As such, if you don't renumber, then the only thing left is to use a timestamp, I guess. [/snip] No, if you have gaps you can still step through sequentially, like 14, 15, 18, 19, 20... [snip] The simplest example (most recent to oldest): select * from table order by datefield desc; To get them in the order they were entered: select * from table order by id asc; To get them in reverse order: select * from table order by id desc; Which I could be used in such a way that you also provide a counter outside of mysql to show the user a number as they step through the records. However, the next time they want to review record xxx, it may not be in the same position because of deletions. [/snip] But if you never change the record number it will always have the same record number. If someone searches for a particular record and it is not there it has been deleted. Renumbering makes this far worse, because if I am searching for record xxx and the table has been renumbered it may now be record yyI'd have no way of knowing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Detect where someone comes from
[snip] I was wondering if there was a way I can see where people are linking to me from. Can I find this in php? [/snip] HTTP_REFERRER is good to see where people are coming from, if it is set. Are you wanting to see if people have links to your site? If so, you're going to need a spider. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mysql Rows
[snip] That's the reason when I started this thread I made it clear that I was NOT talking about a relational dB but rather a simple flat file. What I find interesting in all of this exchange -- however -- is that everyone agree's renumbering the id of a dB is something you don't do, but no one can come up with a concrete (other than relational) reason why. [/snip] Tedd, several here, including me, have said that if you have only a single table database that renumbering is OK, just not a preferred practice. (BTW, you never answered my question about this being a flat file database or single table, although I have figured it out now.) Renumber to your heart's content. If your users are allowed delete privileges (ACK!) and you don't want to confuse them, go ahead and renumber. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Regexp matching in SQL
[snip] I am trying to simplify an SQL query that is pretty much like below: $sql = SELECT * FROM table WHERE keyword RLIKE '$expression1' OR keyword RLIKE '$expression2' ; The different terms '$expression1' and '$expression1' come from an array. Is there any way to within one regular expression to say either term1 or term 2? Something like this where the OR condition would be basically built into the regular expression: $sql = SELECT * FROM table WHERE keyword RLIKE '$expression'; // the $expression would have to signify either a or b. Does that make sense? [/snip] Kinda'. If you asked on a SQL board they would say do this; SELECT * FROM table WHERE keyword IN ($expression1, $expression2) IN is the shorthand for multiple OR conditions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: PHP4 with MYSQL5
[snip] I receive aa answer by e-mail in order this telling me that i must upgrade my php4 to php5. It means that a php4 server don't works fine with mysql5 server? [/snip] http://www.php.net/mysqli is designed to work with versions of MySQL 4.1.n and above. It requires PHP5 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] output Today's date
[snip] ls there anyway I can set the date to the timezone of the clients timezone? For example, if a person opens the web page at 3/6 12:01 EST and another person opens the same page at 3/5 10:01 MST I would like the date to be the above days on the client computers. I know everyone knows this but the way I described this the two people accessed the webpage at the same time but I want the correct date for the client computer to be outputted. [/snip] A client side problem requires a client side solution, you will need JavaScript to do this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mysql Rows
[snip] R O B said: That Rod guy, he's such a card! I'd add something, but Jay has already covered my list in a more recent email than this one to which I'm responding :) jblanchard (who I think is Rod) said: [/snip] I am definitely not Rod. [snip] For sake of argument, let's agree that renumbering dB's is not a good idea -- so if you want to sequentially step through the records, then how do you do it? [/snip] You must have a column that is sequential in some way. An auto-incremented column, timestamp, or some other device that will allow you to step through regardless of gaps in sequence. If you do not have such a column then you could add one. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] LDAP confusion
[snip] if(!$ds=ldap_connect(foo)){ echo did not connect; }else { echo connection successful; } $un = user; $upw = pass; echo connect result is . $ds . br /; ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); if ($ds) { echo Binding ...; if(!$r=ldap_bind($ds, $un, $upd)){ echo unable to verify/br; }else{ echo verifiedbr; } The result is always verified. From the comments on www.php.net/ldap_bind: I have found that if either of the valuse for user or password are blank, or as in my case a typo resulted in a blank user as it was an undefined variable, the ldap_bind() will just perform an anonymous bind and return true! You have: $upw = pass; but using $upd in ldap_bind ... if(!$r=ldap_bind($ds, $un, $upd)){ unless it's a typo in your example that could explain it. ? [/snip] It was a typo. Anyhow, I guess if the connection to the server is anonymous in the event of a bad username / pw combo I will still need to search the AD for a match for authentication. I am still having a problem getting a search to work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mysql Rows
[snip] my reasoning for needing the users number in a database is this... i am going to be doing a lottery type thing where i grab a random number between 1 and the result of mysql_num_rows($result)... that is the reason the gaps matter. the while loop didn't work for me so if anyone could help me out on how to get this number i would aprreaciate it. thank you in advance. [/snip] The one thing that no one has mentioned is that relational databases will returns rows in whatever order they please if no ORDER BY is specified. Generally, due to query caching, rows without an order by will be returned in the same order nearly every time. The better solution here is selecting the lowest ID and the highest ID and selecting a random number between the two, checking for its existence, and doing the operation again until it comes up with a valid ID. This way it matters not what ID's exist in what order and you will always get a valid ID to award the lottery to. Or you could do it all in the query itself, if you wanted to be a true RDBMS master. SELECT * FROM table ORDER BY RAND() LIMIT 1 See...no ID's or artificial ordering required. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] LDAP confusion
[snip] I vaguely recall you couldn't do an anonymous bind to an active directory system - you had to properly authenticate before you could do a search. You didn't include the bind stuff so I can't tell if that's the problem :) [/snip] I thought that I was not doing an anonymous bind, until I changed the username to something that I know did not exist. The bind occurred (or appeared to) anyhow. if(!$ds=ldap_connect(foo)){ echo did not connect; }else { echo connection successful; } $un = user; $upw = pass; echo connect result is . $ds . br /; ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); if ($ds) { echo Binding ...; if(!$r=ldap_bind($ds, $un, $upd)){ echo unable to verify/br; }else{ echo verifiedbr; } The result is always verified. This should be a really simple operation. 1. user enters name and password 2. if bind is successful redirect them properly 3. else give them a message about incorrect login. I really do not need to search the AD or any of that (I may want to install phpldapadmin at some point though). I feel as if I am missing something very simple, I have always been able to connect to everything with PHP. Can anyone help me with this please? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Coordenates latitude / longitude on PHP
[snip] I have to create some maps from a latitude / longitude points. Do anyone know how to convert it to plane coordenates? (In order to show it on a bitmat) I have already found a function but does not work very well ... [/snip] Plain coordinates? You mean as in X, Y coordinates? If so, lat and long are already configured that way. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] echo'ing a variable and cat'ing text
[snip] echo $thedata.@mdah.state.ms.us; [/snip] Try echo $thedata.'@mdah.state.ms.us'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] echo'ing a variable and cat'ing text
[snip] Hi, I just tried that, didn't make a difference, still not getting my expected output. Try echo $thedata.'@mdah.state.ms.us'; [/snip] Ooops, my bad, try echo $thedata .'@mdah.state.ms.us'; And please do not top post. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LDAP confusion
I am trying to work through connecting to and using LDAP with PHP. Thus far I am able to connect and bind, but I cannot search. $sr=ldap_search($ds, CN=configuration,DC=onecall,DC=local, cn=*); Gives me Warning: ldap_search(): Search: Operations error in /srv/www/htdocs/test/ldapTest.php on line 29 The dn is correct, it would seem that the search filter is the issue. Can someone please enlighten me? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] LDAP confusion
[snip] I am trying to work through connecting to and using LDAP with PHP. Thus far I am able to connect and bind, but I cannot search. $sr=ldap_search($ds, CN=configuration,DC=onecall,DC=local, cn=*); Gives me Warning: ldap_search(): Search: Operations error in /srv/www/htdocs/test/ldapTest.php on line 29 The dn is correct, it would seem that the search filter is the issue. Can someone please enlighten me? [/snip] Aha! It may not be me. The LDAP server is Win2003 and has some known problems when searching LDAP. I haven't located a solution, but if you are privy to one or two or ten could you let me know? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Only 4 of 5...
[snip] I have 5 posts in the table, but the images shown are only four! Why? [/snip] Are you counting starting with 1 or 0? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Only 4 of 5...
[snip] while ($dbArray = mysql_fetch_array($querys)) { $dbIDPic = $dbArray[IDPic]; $dbPicNameSmall = $dbArray[picNameSmall]; ? img src=phonepics/?php echo $idModel;?_?php echo $dbPicNameSmall;? alt=testbild från mobil border=1 width=120 height=130 ?php [/snip] Is $dbIDPic an integer? Does it start with 0 or 1? Try $dbArray = mysql_fetch_array($querys); For($i = 0, $i count($dbArray), $i++){ echo $dbArray[0] . \t . $dbArray[1] . \n; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] LDAP confusion
[snip] Aha! It may not be me. The LDAP server is Win2003 and has some known problems when searching LDAP. I haven't located a solution, but if you are privy to one or two or ten could you let me know? [/snip] Well, I thought that I had escaped the hell of a Windows world when I accepted this position, and now it is just not true. We have all of our users authenticating through AD on a W2003Server, so I thought I'd use LDAP for web authentication as well. It doesn't work. For some cockamaimee reason there are problems using PHP/LDAP with W2003Server. To be sure, I found plenty of evidence that all was well prior to W2003Server, there are many posts web wide about how well it was working with W2KServer, etc. Does anyone know how I can fix this without having our Windows folks do something to the server which will undoubtedly hose things up? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Failed to open stream
[snip] I have two *identical*l routines residing on two difference hosts -- one works and the other doesn't. [/snip] Is safe mode 'on' on one and not the other? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] More CLASS help
[snip] I am not sure if what I am doing here is a problem or not. Pointers? class mySubnet { var $data; function SubnetSettings( $level, $add_vlan, $edit_vlan, $del_vlan ) { } } [/snip] Call the constructor outside of the class. $subnets = new mySubnet; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] working with ini files
[snip] I have created my own ini file. I can read the values into an array fine. but What I want to do is change a value in the ini file. Example file.ini dog = 3 cat = 4 fish = 7 altered file.ini dog = 3 cat = 5 fish = 7 [/snip] ini_set is for the php.ini, not yours. You will need to open and write to your ini file. http://www.php.net/fopen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Array sort question
[snip] How can I sort a 2 dimensional array by number of elements? [/snip] Start by RTFM http://www.php.net/manual/en/function.count.php
RE: [PHP] Array sort question
[snip] I love how infinitely helpful people on this mailing list are. It's a wonder people are being turned off to PHP. There's no one here willing to help new people more than throwing them RTFM responses. [/snip] Are you new here? I would rather teach a man how to fish than give him his supper on a silver platter. The OP did not show one ounce of having tried to find the answer on his own, he just wanted us to write the code for him. This same exact thing happens every few months, people get chastised for aa RTFM answer when that is the most appropriate answer. I didn't see you jump up with an answer there Sparky. Nope, your response was almost worthless. I, at least, gave the man a place to start looking for answers. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Array sort question
[snip] If you say so. In that case, jblanchard, I apologize for my outburst. [/snip] Apology accepted. Look, several of us have been on this list for years and have helped several others through their issues. Mailing lists like this (try a C++ newsgroup for example) are much more merciless than some of us here, we have toned it in the past year or so. Folks here volunteer a lot of their time and are less likely to help those that will not help themselves. The array sorting suggestions you provide will not sort based on the number of items in each array, which is what the OP wanted. He will have to count each array and then order the arrays by the number of objects contained in each. He could make an array of the arrays and go in that direction. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Array sort question
[snip] That's not entirely fair. I would have said his usort() suggestion was a better pointer than a link to count() - which gives no hint as to how to sort the list, which is after all what the OP's trying to do. ObSuggestion: function byLength($a, $b) { return sizeof($a) - sizeof($b); } usort($rgArray, 'byLength'); Well said, after all there is more than one way to skin a cat. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sr. PHP Salary North Carolina
[snip] Can anyone possibly tell me what the salary range is for a Sr. PHP/MySQL Developer in North Carolina? [/snip] Have you tried looking at salary.com ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Testing
I am conducting a test of my new e-mail address. This is only a test. If this were not a test you would be instructed to tune into your locale emergency sarcasm system. Please RTFM and Have a PHP Day! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php