@# 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 33



Comments:

<0> cathar: NP.
<1> what other interfaces does php5 come with like Iterator? is there a page on the site that shows them all?
<2> JakeConnor: Um.. what is there that needs iterating that can't be put in an array?
<0> JakeConnor: http://www.php.net/manual/en/ref.spl.php
<1> FauxFaux: you don't make sense
<3> FauxFaux: i'm using bla bla as a simple example, really what i'd want is to have a function that would ad the Td and /td align left or right depending on other parameters and also have an "email format" which will allow or disallow links or "<span>"'s embded that will normally cause popups with the css but i'd want todisable in some cases.
<3> so the consensus seems to be unsure
<3> i'll just find a way to test
<3> thanks guys
<4> what is the way to 'remember fields' ?
<0> HS^: You're going to have to elaborate on the meaning of your question.
<4> for example a field misses some informations.. but the user shouldnt have to refill all fields.. just the missing
<5> cathar, if(date("l") == "Sunday") $t1 = time(); else $t1 = strtotime('last sunday'); $t2 = strtotime('next sunday'); this would work as you described
<0> HS^: Look at the $_GET or $_POST superglobal arrays.
<4> superglobal ?
<4> i know what GET and POST is



<0> HS^: http://www.php.net/manual/en/language.variables.predefined.php
<4> but superglobal??
<0> HS^: Just read that page.
<6> back, and colder, yeah thats what I just managed to munge together from previous examples :)
<4> i know what GET and POST is...
<7> Can anyone help me make a RegExp to find stuff like this "http://www.43folders.com/2006/03/02/transmit-remote-editing/#comments"; in a block of text?
<0> JakeConnor: Actually... there's a concept similar to multiple inheritance called "mix-ins" that can potentially be accomplished with PHP using runkit, which is a PECL extension.
<8> njdavid; It starts with a delimiter and ends with a delimiter :)
<6> njdavid: do you want to find the whole string?
<7> cathar: I want to find all of "http://www.43folders.com/2006/03/02/transmit-remote-editing/#comments"; in a block of text.
<6> you could explode it as suggested using the delimeters
<0> JakeConnor: http://en.wikipedia.org/wiki/Mix_in
<0> njdavid: No, but we can point you to regex resources that teach you how to do it yourself.
<6> does any of that string change at all or it is always the same, cos if it doesnt change you probably wont need to reg-exp it
<1> Elazar: cool thanks
<9> I can't remember how to make apache able to parse php commands in standard .htm files anyone got a url?
<0> LinkSlice: I'd ***ume you need to use the AddType directive.
<0> LinkSlice: Tell it to ***ociate the application/x-http-php type with the .htm extension.
<10> when merging images in gd, can you keep the gif animation anyway?
<9> Elazar: ya I was looking at that...
<7> cathar: It changes
<9> Elazar: ah yup...t'anks
<6> njdavid: you need to be a little more spcific on which bits change really :), i mean does it always start with http:? end woth #comments? that kinda thing
<11> can you start a block of php with a percent sign, or is that asp?
<7> cathar: http://www.43folders.com/?feed=rss2&paged=2
<6> Ahhhh so the domain is the same
<0> nater: That's ASP, but I believe there's a configuration setting that enables support for ASP-like tags.
<6> the rest changes
<11> elazar: thanks, you settled a disagreement that google couldn't
<0> nater: http://us2.php.net/manual/en/language.basic-syntax.php Do a find for ASP
<11> or that i couldn't settle via google
<0> nater: Heh... Google does tend to have a large noise to signal ratio.
<12> PHP supports the <% tag to start PHP, but nobody here will recommend that you actually do that
<7> cathar: yup
<0> nater: I agree with deekayen... I don't recommend using the ASP-style tags. Using full open tags (i.e. <?php) ensures the most compatibility.
<0> nater: So if you're ever stuck in a situation where you don't have access to change configuration settings or have to switch PHP versions or what have you, you won't be stuck porting code over to use the full open tags. ;)
<0> nater: Kind of reminds me of that Nancy strip where she's sitting on the ground with roller skates on and putting band-aids on various body parts. When asked by someone what she was doing, she promptly got up, slipped and fell, and turned to reply, "Saving time." :P
<11> right, it was just a disagreement as to whether it could be done in php... neither of us have ever used <% in php
<11> i just thought it was invalid
<0> nater: Ah, gotcha.
<7> cathar: Any ideas?
<6> njdavid: try something like preg_match("/^(http:\/\/)?([^\/]+)/i")
<13> "thinktank"?
<6> obviously if you dont want to match, change the function
<14> I've read and read eval() should not be used at all costs. If that is the case what does one do then when you have a site that is database driven an you require content to have PHP code around it, validation, etc.
<6> oh and you'll need to add your content in
<15> $text = preg_replace( '/(http|ftp)+(s)?:(\/\/)((\w|\.)+)(\/)?(\S+)?/i', '<a href="\0">\4</a>', $text);
<16> Hello. How can I calculate how much seconds I life (on my exactly birthtay date + hour)
<15> how do i urldecode(\4) in this regex?
<15> or \0
<0> Stormchaser: Check #php.thinktank out. I think you're a good patron for it. ;)
<0> JakeConnor: But, IMO, if you have two cl***es you want to inherit methods from, they should probably be in the same cl*** to start with.
<3> rbax: just use unix time of right now - unix time of your birthdate and time.
<11> i have yet to work on a large enough project where i would consider an oop approach beneficial
<6> rbax: use mktime to calculate your biurthday
<6> rbax: then take the current time away from it
<3> cathar, reverse that please.
<3> or he'll be -seconds old.
<6> I so cant type today



<16> humm
<11> resreses it? i'm so gonna use that in conversation today
<3> at least we get a long weekend
<3> i so need it!
<6> Need one..
<3> been working way to much.
<3> i hate the jan to easter crunch
<16> I'll try write-to-paper SimAtWork idea
<3> someone important needs to die in feb so we get a holiday in there.
<0> nater: I generally only use OOP for database wrappers and template engines. It seems rather extraneous for other things.
<0> SimAtWork: I think they did... it's called Valentine's Day. ;)
<3> valentines is not a holiday
<3> in fact.
<3> it's an extra work day.
<3> welle xcept my gf doesn't care about valentines either.
<0> Valentine's is a holiday, just not one that employers generally give you paid time off for. ;)
<3> ok
<3> it's not a stat holiday
<3> maybe bush will die in feb next year
<3> we can all hope
<6> hometime
<6> bye bbye
<11> smiatwork: jan to easter crunch? that's like a normal thing for you?
<11> simatwork: usually we get the big crunch right around new years
<17> Stormchaser, you wound me brother :(
<3> nater: it is normal thing for me.
<11> simatwork: what drives it? seems like an odd time to have a larger workload
<18> January to mid-April is the financial industries busy time...in this country anyways.
<3> nater: my biggest client sells potted plants.
<3> well plants
<11> ah... didn't even consider tax season
<11> simatwork: site?
<18> nater: That's what crushes me :)
<3> www.panamnursery.com
<18> Taxes and RRSP's.
<19> heyo
<11> simatwork: who did your graphics?
<3> nater: a guy here
<3> his name is rob
<19> how can i use regexp to return true (or false, doesnt matter really as long as i know which) if a string contains something that is not [[:alnum:]] , . _ []()
<11> is there a regex channel?
<19> no idea
<11> should be...
<3> Squalleh: if preg_match
<3> Squalleh: or something like that
<19> what kinda nerd would make a regex chan....
<3> yah preg_match
<3> and same kind of nerd that would start a php channel
<8> Squalleh; You wanna diss me?
<8> :p I
<19> yeah but whats the actual regex function
<19> for that
<3> Squalleh: just what you want to match
<3> http://ca3.php.net/manual/en/function.preg-match.php
<11> simatwork: all i'm seeing on that site is html documents
<3> nater: yah, i didn't do that site.
<3> nater: it's rather bland.
<3> nater: the php is for all the internal stuff.
<19> yeah i sussed the function just trying to work out what the actual regex is
<19> cos it has to work both with all of those things and with say, just letters
<11> simatwork: rob likes his dropshadow effect ;-p
<20> is it possible to genereate variables from an array automatically? I have an array with variables sent from a form, then if there is a problem it redirects from the validation back to the form. I don't want to statically ***ign variables to the session ones e.g. $name = $_SESSION['lastpost'] ['form'] ['r_name']
<21> ok, something is strange with php now.
<3> nater: and animated gifs
<11> text seems kinda pixelated to me
<11> simatwork: yeah, i noticed those... i ***ume those are scavenged from the net?
<22> grogoreo: arrays are variables, so your question makes little sense
<3> nater: not sure.
<23> grogoreo- you could just do $_SESSION['form_stuff'] = $_POST;
<22> grogoreo: if you mean pulling the elements out of an array in to individual variables, you may want http://php.net/extract
<20> caffinated, I want to ***ign other variables based on the variables in the array
<3> nater: i try not to get involved, cause then they'll want me to redo it sooner :)
<20> caffinated, I think that's it. Thanks guys
<16> SimAtWork: where I can find some examples for my work?


Name:

Comments:

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






Return to #php
or
Go to some related logs:

authpam ubuntu-server
sli on master and sli on slave
VGA compatible controller: Intel Corp. 82845G/GL[Brookdale-G]/GE Chipset Integra
ubuntu anjuta2
linux eclipse appletviewer not found in gnu.gcj
#web
Partition Bunta
#css
mysql 5.1 release date
ImportError: No module named gobject centos



Home  |  disclaimer  |  contact  |  submit quotes