@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32



Comments:

<0> why not?
<1> he has to match a string at the end of the string
<0> IAW maver. regex rocks
<2> ^Migs^: if you have to ask, you don't understand regex very well
<1> simplest way is a regexp
<0> actually, i don't understand it at all
<3> I'm sure there is a function other then regular expressions that could help with this.
<2> ***yKen: several. substr() comes to mind
<3> parse_url wont work...though I thought it would.
<0> ***yKen: We already discussed other possibilities. Pay attention.
<3> Caffinated -- well I thought that'd be good as well...
<1> lig: you should update your blog in a moment with regexp :P
<3> ...though what happens when I have a .co.uk address?
<0> did you just have everyone on ignore?
<0> yeah, preceisely why pathinfo has its faults



<0> *precisely
<1> ***yKen: you have to make an array with all the TLDs
<2> good luck with that
<3> With which part, an array with all the TLD's?
<1> well, this is just the starting point :)
<2> btw, following the spec, the TLD for that is .uk, not .co.uk
<1> then you have to check, foreach TLD in that array
<1> if it matches in the end of your string
<3> caffinated, when it's p***ed to the registry via my API, it's co.uk
<2> ***yKen: it would appear you're right. that is an interesting oddity.
<3> Are hash's and arrays totally different.
<3> IE: domainHash - This should contain the domain name(s) which are to be registered.
<3> The Hashtable should have the domainname as the key, and the number
<3> of years to register the domain for as the value.
<3> ex. {domain1.com=1,domain2.net=2}
<2> ***yKen: maver might be correct in this case - you're going to need an acceptable TLD list
<3> woah
<3> that appeared as one line in my client sorry about that paste
<2> no, hashes and arrays in php are the same thing
<2> even though they're called 'arrays', which is a misnomer
<4> ***yKen- in general, hashes have string (or other types) for keys, while arrays have integers for indices
<2> in general, php doesn't really have arrays. it only has hashtables.
<4> PHP uses the same array type for both
<3> Ahh, because an "array" can have it's element called by either it's number, or "key", is that way they're really considered hashes.
<2> and anyone who says php arrays are really arrays are smoking crack.
<4> ***yKen- no, because a PHP array can have strings as keys
<2> Dragnslcr: ot
<2> err
<4> PHP doesn't have normal arrays, only hashes
<2> Dragnslcr: it's not just that. even when you use numeric indicies they act nothing like arrays.
<2> in a real array, if you remove an index, the array is shifted
<2> if you remove an index in a php 'array', it's not shifted. you have an index gap.
<5> And by extension, the obscene number of sorting functions become signifcantly reduced, because you stop needing functions to 'preserve key/value ***ociations'
<4> In a real array, you can't really remove an index
<4> You can just move everything down to overwrite the element you want to remove
<2> Dragnslcr: you know what i mean.
<4> Yeah, I know
<6> It depends on your definition of 'real array'
<4> The point being, a normal array uses the integer index as an offset into the array's memory
<2> ds-: almost every other language's arrays act like that
<6> not C's :P
<2> 'almost'
<6> and everybody knows that is the only "real" language :P
<2> sure, if you like pain
<6> :D
<7> hello all, newb question. what functions should I use to sanitize a form submission for a sql query?
<4> So it doesn't have the quite the same concept of individual elements that PHP's arrays has
<0> mysql_sanitize_submission()
<8> leprasmurf: trim, and stripslashes?
<1> leprasmurf: *_real_escape()
<2> you don't use stripslashes to sanitize things
<7> awesome, ty I'll look from that:-)
<6> caffinated, I do agree with you though...array_splice pisses me off too :P
<0> yeah, no stripslashes. use real_escape_string
<2> ^Migs^: that won't do anything but error
<0> mysql_real_escape_string
<8> grrr... css is messing up
<2> ds-: it would have been nice if they had actually made different datatypes.
<8> rather my use of css is messed up
<0> heh



<9> hi
<0> like saying "my Internet is broken"
<9> what is the best PHP5 framework ?
<9> I need a recomendation
<0> PHP on TRAX
<10> what's trax?
<9> Hi ^Migs^
<0> hi feistel
<11> sounds like another ****ty rails implementation
<6> caffinated, there are pros and cons to each I suppose
<0> actually, I don't know. I don't use framework, but it exists
<0> PHP on TRAX, I mean
<6> there isn't a good framework...roll your own
<0> you could try the Zend framework
<11> heh...no...no don't try zend...
<0> if there's no good framework, how would rolling your own help?
<9> ^Migs^, I find a open source project
<6> <- being fascicious
<11> zend framework scales about as well as rails does
<9> danf_1979, http://www.phpontrax.com/
<0> PHP doesn't need framework
<6> All the people I know that are using frameworks seem to really like symfony
<10> thanks
<12> php on trax has no file packages on sourceforge ^Migs^
<2> ^Migs^: then you've never really done any serious work.
<2> large projects need a framework. otherwise you have a mountain of code duplication all over.
<0> no, I'm just not lazy
<2> ^Migs^: you really don't know what you're talking about
<0> yeah, I often talk out my butt
<5> But... Laziness in programming is a good thing, it leads to a desire to reuse things.
<6> here here
<11> hear*
<1> symfony: "professional web tools for lazy folks" (http://www.symfony-project.com/)
<6> don't correct my spelling, I mean exactly what I say
<2> I think what you really wanted to say is "php doesn't need a templating engine" which is true.
<0> I have a rather big web project coming up. I'll try a framework
<13> mhmm
<14> hi, i'm having trouble upgrading File with pear, this is the error i get
<2> but a templating engine and a framework are _not_ the same thing
<0> that was an earlier discussion, caffinated
<14> ERROR: pear.php.net/File: conflicting files found:
<14> File/CSV.php (pear.php.net/file_csv)
<12> shagga and migs do you guys use trax?
<0> no, acidjazz
<0> how about this, what's the least crappy PHP framework?
<2> ^Migs^: I wouldn't know, we have our own framework.
<5> From a cursory glance at the available public offerings, I prefer mine.
<10> TRAX is like a templating way of doing things'
<10> ?
<2> danf_1979: download it and find out.
<0> I wouldn't know, danf_1979
<10> Oh!!! I saw the demo...
<10> pretty nice
<12> ^Migs^: why cuz its crap?
<2> the problem with frameworks is that you don't really ever want a signle framework for any given application
<6> My outlook on the whole matter is if you don't know why you are using a particular framework then you are probably going to have some serious issues with said framework
<2> a framework should meet the needs of your project.
<0> no, I've never used a framework
<0> that's what I figured
<2> ^Migs^: that would explain why you don't understand them
<0> which almost means it's best to develop your own
<15> how could I remove all keys that have empty values in an array?
<0> not necessarily. I could very well understand them without having used them.
<4> http://www.php.net/array_filter
<2> ^Migs^: I doubt it. not the way you're talking about it.
<16> we just finished a Spring java app, and I didn't understand why spring was any use until the end of the project
<12> ^Migs^: so if you never used it hwo do you know if its the best framework for php5
<6> Xyphoid, but I am sure SOMEONE knew why you were all using it :)
<15> dragnslcr: thanx but is there one I can only specify for ''?
<16> ds: the brother of one of the programmers who'd done it before. terrifying.
<1> vhuren: you could iterate the array, but array_filter() is very good to do your work
<15> ok
<15> so I goto define a custom function that just checks for empty strings


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

unable to find your mysql lib dir
perl Ircspider
#perl
#linux
icewm-themes sarge
what is xen diamon
#css
feh sarge blue
#css
awk == echo -n



Home  |  disclaimer  |  contact  |  submit quotes