The only part I've edited is the "new_slug" code, currently it causes the page its used on to be blank.
Would be nice if pastie was actually available today to see the code.
What still needs to be done? Incrementing?
Thats what my code is supposed to do. Problem is, it breaks the webpage, for some reason.
For that last for() in new_slug(), should that + be a period?
I dunno. I made it like a java program, but all the variables have $ in front of them.
Hold on, should both the pluses be .'s? I'm trying to add all of the characters in the array together to return them.
No, within the for() loop. Between the brackets. { }. Periods concatenate strings in PHP. (if that's what you're trying to do).
Right, thats what I'm asking. In the last for loop, should both the pluses be .'s or just the first one?
btw, PHP doesn't require brackets. How you had it was fine. Does it work?
No. I just added the brackets for readability. But what I'm wondering is, why would a screwp in the code affect whether the webpage shows up
Try adding this towards the top: error_reporting(E_ALL);
It'll point out whatever error is there.
the top of the new_slug or the entire class?
Still nothing on the webpage.
Line 97 from the pastie should have two = signs. if($char_to_increment == -1)
(well, that wouldn't cause the script to crash. I was just pointing it out. :/ )
For that last for(), you can just use $first = implode("", $all_char);
Ok, I put the error reporting thing in common.php and something showed up. Woo.
Found the error: $slug = $this->();
Well, guess you beat me to it.
$slug = $this->new_slug();
there a special way to compare characters?
I can't think of any other way.
Well, its giving me an error with this line if($all_char[$num] != $final_char)
Uninitialized string offset?
Looks like you have an infinite loop. Can you pastie the file?
Shit, put ++ instead of --
Do you know if any of the errors that show up on the page are worriesome?
Um, I don't know. I need to see the file.
The missing argument isn't serious, and the undefined variable is easily fixable.
Okay, the page has no more errors, but now it keeps returning the same URL...This is mine though, not a PHP error.
What do you mean? Looks fine to me.
Figured it out. >= rather than =.
½.WS now has the shortest urls eva.
Hopefully it will rotate to two characters when the time comes. But, I must say Chris, this would not have been possible without you.Thanks!
Does it increment alright?
well, it goes from a to b to c so far, but I want to see if it goes from - to aa