#php
31 October 2007
Total 51 pages. You are browsing page 1/51.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Wed Oct 31 00:00:02 2007
00:00 <****> whats a singletone
00:00 <****> singleton even
00:00 <****> static call of a method.
00:00 <****> lol always meant to ask that too because i had an interview question on it one day and hadnt a clue!
00:00 <****> jsoftw: the singleton pattern is a common way of returning a single instance no matter how many times it's instantiated
00:00 <****> hi people
00:00 <****> i want to convert a text string in a array
00:00 <****> is possible?
00:01 <****> the singletone pattern
00:01 <****> pattern eh.
00:01 <****> DanyWalker: PHP will treat a string as an array automagically.
00:01 <****> JamesG: no it won't
00:01 <****> DanyWalker: You can access each char as $string[position]
00:01 <****> for example: $x="Peru"; , then: $x=('P','E','R','U'); and when i try: $x[2]='R';
00:01 <****> jsoftw: eg. static function getInstance() { static $instance; if (!isset($instance)) { $instance = new __CLASS__; } return $instance;
00:01 <****> }
00:01 <****> JamesG: String is string, array is aray
00:01 * gentoodude awaits assistance
00:02 <****> Bleh
00:02 <****> Wolfy[drawing]: Sure, from a type standpoint, but you can still treat a string like an array in the way I said.
00:02 <****> some function ?
00:02 <****> can some one help me. http://www.nomorepasting.com/getpaste.php?pasteid=5840 -- in this code i have a few radio buttons i need to verify... when i submit my form it comes up with the all fields not filled in error... any idea what im doing wrong?
00:03 <****> JamesG: That doesn't make it an array.
00:03 <****> did you have to paste all your code?
00:03 <****> tldr;
00:03 <****> DanyWalker: as JamesG says you can access individual characters like that already, but if you want to use the array functions you'll need to use str_split()
00:03 <****> Wolfy[drawing]: I didn't say it was an array. I said you can treat it like one.
00:04 <****> hello
00:04 <****> JamesG, in a way
00:04 <****> DanyWalker: PHP will treat a string as an array automagically." which is flat lie.
00:04 * gentoodude must be invisible
00:04 <****> sigh
00:04 <****> Wolfy[drawing]: Are you drawing a picture of an array? ;-)
00:04 * arpad seconds that sigh
00:04 <****> gentoodude, pastebin is too big... tldr;
00:04 <****> It won't treat it like an array, either really
00:04 <****> http://paste2.org/p/8890
00:04 <****> Each key of an array, sure
00:04 <****> why isnt it ordering it
00:04 <****> =(
00:04 <****> Because it's an offset, essentially
00:05 <****> !help paste
00:05 <****> I should have said "you can treat it like an array, in this specific way". I mis-spoke. Pardon me.
00:05 <****> cyth: tl what?
00:05 <****> too long didn't read
00:05 <****> unbeatabl: #mysql?
00:05 <****> Where do I paste code?
00:05 <****> help me
00:05 * JordanC imagines Wolfy[drawing] is drawing a picture of a flower :)
00:06 <****> I have an if statement, and I want to literally 'break' out of the statement if something happens. I tried exit, but that exits the script. I just want to exit THAT if statement.
00:06 <****> pastebin sucks.
00:06 <****> No, I usually draw idiots.
00:06 <****> alecwh, anywhere you feel like it
00:06 <****> Wolfy[drawing]: Self portraits are cool
00:06 <****> at least pastebin.net or whatever that main site is does.
00:06 <****> alecwh: wrong logic you can't break out in a middle of an if
00:06 <****> unbeatabl, that's a big friggen sql statement
00:06 <****> cyth: I get this: Fatal error: Cannot break/continue 1 level in /var/www/v2.1.1/article.php on line 21
00:07 <****> cyth: how is it too big? it all fits...
00:07 <****> alecwh: structure your if statement better. instead of "if () { ..... if (foo) { magic_break; } .....
00:07 <****> unbeatabl, try #mysql
00:07 <****> arpad, let me paste code.
00:07 <****> heh
00:07 <****> Is there a pastebin?
00:07 <****> alecwh: ", do "if () { ..... if (!foo) { ..... } }"
00:07 <****> help I cant get exec() to work
00:07 <****> ..
00:07 <****> gentoodude, too long for my lazy ass to read it all be cause I have better things to do then look over code that long right now, and so do everyone else in the room
00:07 <****> get yourself a debugger
00:07 <****> JordanC: . . . Don't worry... You're in the picture as well.
00:08 <****> !pastebin
00:08 <****> Wolfy[drawing]: Excellent. Maybe you can draw a picture of your anxiety problems as well :P
00:08 <****> !php paste
00:08 <****> cyth: turn on line numbers and look at 75 and look at the forms at the beginning please
00:08 <****> !tell alecwh about pastebin
00:08 <****> unbeatabl: If it is a php problem, then posting just the SQL query isn't much to go on for PHP
00:08 <****> thanks James. :)
00:08 <****> JordanC: Anxiety? What anxiety?
00:08 <****> Nevermind :-)
00:09 <****> It's just your..
00:09 <****> gentoodude: have you tried solving it by yourself yet?
00:09 <****> Well, no I guess that's not important
00:09 <****> idiot.
00:09 <****> Uhm, I just got an error on pastebin... looks like the system is messed up
00:09 <****> gentoodude, and what is the problem?
00:09 <****> Wolfy[drawing]: :-)
00:09 <****> is there some stack structure i can use in php?
00:09 <****> AlReece45: yes for a damn hour..
00:09 <****> thnee, arrays
00:09 <****> you can treat them like stacks
00:09 <****> they have push and pop?
00:09 <****> yup
00:09 <****> thnee: As in backtrace?
00:09 <****> Ever heard the criminology term "Less than dead" ?
00:09 <****> cyth: see the first check? it says "all feels no filled out appropriately" or something.. it thinks things are left improperly filled once i added the check for the radio buttons.. is that how you verify radio buttons?
00:10 <****> http://pastebin.com/m347945e9
00:10 <****> That's what I want to do
00:10 <****> JordanC: STFU, please.
00:10 <****> I dont' think I ave the wrong logic...
Total 51 pages. You are browsing page 1/51.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
