IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-06-24
Pages: < Prev
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
34
Next >
[12:38]<wjlllrws>ICE: We figured it out. Scroll up
[12:38]<ice>whats wrong with it
[12:38]<wjlllrws>ICE: It needs to be ewscaped?
[12:38]<wjlllrws>!+strings
[12:38]<lxl-2jv>[STRINGS] Please read http://php.net/types.string for a basic understanding of how strings work in PHP, as well as http://php.net/strings for functions to manipulate strings. Be sure to read 'user comments' as well.
[12:39]<ice>prob my quotes then
[12:39]<smpsmpsmp>and \'s added
[12:39]<ice>I never do
[12:39]<smpsmpsmp>why are you php ing that
[12:39]<ice>always worked for me
[12:39]<smpsmpsmp>lol
[12:40]<smpsmpsmp>you need a \ after tje =
[12:40]<smpsmpsmp>the
[12:40]<ice>cause is dynamically calling for database entries
[12:40]<ice>thats why
[12:40]<ice>thats one line of code
[12:40]<ice>lol
[12:40]<wjlllrws>. . .
[12:40]<smpsmpsmp>what are you talking about this a simple string stuff :P
[12:40]<smpsmpsmp>ad the \ to the strings
[12:41]<smpsmpsmp>well you could just use <?php=sdfsd?>
[12:41]<smpsmpsmp>i mean
[12:41]<smpsmpsmp><?=dfdsf?>
[12:42]<wjlllrws>no
[12:42]<smpsmpsmp>??
[12:42]<wjlllrws>!+short tags
[12:42]<lxl-2jv>Short tags are <? or <%, and should never be used. They are scheduled for removal from PHP6, and are configuration dependant. Use <?php, period.
[12:42]<smpsmpsmp>ok then ;)
[12:43]<smpsmpsmp>i havent used php since php 3 soooooo yea
[12:43]<smpsmpsmp>well i feeled with 4 its new stuff
[12:43]<smpsmpsmp>and the OOP part of 4
[12:43]<wjlllrws>!+enter
[12:43]<lxl-2jv>Don't use the enter key as punctuation. Think in complete thoughts, then type.
[12:45]<smpsmpsmp>you broke your own rule
[12:45]<smpsmpsmp>and i was trying to be friendly
[12:46]<ice>I see the problem
[12:46]<smpsmpsmp>welll what can i expect from IRC and its power hungry idiots
[12:47]<ndf>Well you do use enter as punctuation at the moment sdfsdfsdfl.
[12:47]<smpsmpsmp>i know but its still rude to come out and say it :P
[12:47]<smpsmpsmp>Its IRC not a english classroom ...... suppose to relax
[12:47]<ndf>Not really. In my opinion it's rude to not change it after we told you.
[12:48]<smpsmpsmp>stijn: were you that guy way back that made e shop or w/e
[12:48]<smpsmpsmp>eml: oooooo calm down now .......
[12:48]<ndf>Sure, some irc channels are not an english classrom, but this channel sure is. :-)
[12:49]<svyag>sdfsdfsdf: i've made an e shop before, but i think you have me confused with someone else :p
[12:49]<wjlllrws>Wizz_Kid: nobody is keeping you in this room... If tou don't want to play like the rest, then you're free to leave...
[12:49]<smpsmpsmp>oooooo Wolfpaws get ahold of yourself
[12:50]<smpsmpsmp>stijn: i dunno i jus remember someone with your name making a cart and selling it
[12:51]<ndf>Wizz_Kid? :-)
[12:51]<wjlllrws>yep
[12:51]<ndf>I don't get it. :(
[12:51]<wjlllrws>eml: He's known annoyance hre.
[12:51]<wjlllrws>*here
[12:51]<smpsmpsmp>LOL
[12:51]<ndf>Hmm, okay. :-P
[12:52]<smpsmpsmp>YOU seriously sound stupid
[12:52]<smpsmpsmp>i havent been in here in 2-3 years
[12:52]<wjlllrws>sure....
[12:52]<wjlllrws>0 ### Log session started at Sat May 13 08:00:10 2006 ###
[12:52]<wjlllrws>92 [08:00:10] Common channels for Wizz_Kidd [n=me@cpe-24-33-229-126.insight.res.rr.com]: ##php, #python
[12:52]<smpsmpsmp>DUDE fucking compare ip and host names
[12:52]<smpsmpsmp>Wizz_Kidd ??????????
[12:53]<smpsmpsmp>n=me ????????????????
[12:53]<smpsmpsmp>i use windows
[12:53]<smpsmpsmp>looks like you got an error their buddy
[12:53]<wjlllrws>I think it's time to end this discussion
[12:53]<ayzzsvnz>i agree
[12:53]<ndf>So do I.
[12:56]<wjlllrws>I'll give him what? 30 minutes or so...
[12:56]<ndf>Time for me to go back on topic then. Yeah, it's time to discuss PHP. I have this array: $ctgArray = array("Electronics", "Blogging" ...); Ok, so $ctgArray[0] equals "Electronic". Now I have a form (an <option>) that 'gives a numeric value', which should be compared to this array. But the value is sent as a string, straight from the dump: ["aCategory"]=> string(1) "2", so I'd need to use that "2" in $ctgArray[2], but how to? Sorry if I'm being unclear.
[12:57]<ayzzsvnz>Wolfpaws, two or three years sounds good to me :P
[12:57]<pdznsvzvz>eml: echo $ctgArray[$_POST['aCategory']]
[12:58]<ndf>fyrestrtr, But wouldn't that be $ctgArray["2"] as in an associative array?
[12:58]<pdznsvzvz>eml: no, PHP is smart like that :)
[12:58]<ndf>Oh, okay.. *DUH*
[12:59]<pdznsvzvz>does anyone have experience with interbase and can lend a hand. Whatever I do, ibase_connect() refuses to open a connection to a file, giving me the most useful message of -902 : Unable to complete network request to host "localhost". Failed to establish a connection. Connection refused
[13:00]<wjlllrws>jiggster: lol
[13:00]<ndf>Ah, looks like I'm sending the wrong value too anyways. I'm sending "Blogging" instead of "2" for example. <option value="2">Blogging</option>? :-( I know it's rather a #web-question but I think it fits quite well here since I've been asking PHP-questions about the same thing anyways.
[13:02]<ndf>Ehm, my bad again. Sorry guys. Nevermind that last question.
[13:02]<pdznsvzvz>No, you would be sending 2, not blogging. The value attribute is passed, if present. <select name='foo'><option value='x'>googoogaagaa</option></select> echo $_REQUEST['foo'] <-- will echo 'x' not googoogaagaa.
[13:02]<ndf>fyrestrtr, Yeah, the fact that I did echo $ctgArray[$_POST["qCategory"]] confused me and my headache. :-p
[13:03]<pdznsvzvz>ah yes, having the right key would help.
[13:03]<ndf>Yeah. :-)
[13:04]<ndf>Hmm, what about checking if that actually exists in the array? in_array() wouldn't fit, since it's not the actual value I have in hand, but the index. Perhaps isset($ctgArray($_POST["qCategory"])) would be the best way?
[13:18]<ggfugsv>I'm reading php5 objects patterns and practice, I got a question about classes can somebody help? In the book the have an example. Class product has something like name, price ... the author makes for each product a $product1 = new Product... But what if I want to display 10 products?
[13:20]<wjlllrws>enquest: Hum... Perhaps you want a loop on that?
[13:20]<ggfugsv>Wolfpaws, aha
[13:20]<ggfugsv>But then my question: If I want to display a list off all products. Do I make for this a class?
[13:21]<ggfugsv>this class would then have the sql query to get them, and the display them in a list and have an offset function and ...
[13:21]<ggfugsv>Or would I need to make a class for offset, display,
[13:22]<ggfugsv>Or would I query it outside the class and feed the class this results of the query?
[13:22]<xmlxjym>you would have some function that gave you an array of instances of that class
[13:24]<wjlllrws>enquest: Or you might want to make a *set class, which willl return you a set of requested products
[13:25]<xmlxjym>(does php 5 have decent standard collections available yet? I'm still using basic arrays
[13:26]<ryac>define collection
[13:27]<xmlxjym>OO lists or sets
[13:28]<fzywjg>PHP array normally have all the functionality you need.
[13:28]<fzywjg>*arrays
[13:28]<fzywjg>They are lists, stacks, queues, hashes :)
[13:30]<zuvscyon>I have an app that's dying without an error







