GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Your PHP questions answered (https://gfy.com/showthread.php?t=647053)

sevent 08-21-2006 10:28 PM

Your PHP questions answered
 
To celebrate my 2nd post (whoooo wooo!) I'll be answering any PHP question you have for the next hour.

NiggaRiche 08-21-2006 10:30 PM

write me a big cms management script.

i mean

can you write me a big cms management script?

CaptainHowdy 08-21-2006 10:35 PM

Why the hell PHP stands for "Personal Home Page"??

sevent 08-21-2006 10:36 PM

Quote:

Originally Posted by CaptainHowdy
Why the hell PHP stands for "Personal Home Page"??

I doesn't. It stands for PHP Hypertext Processor.

Next.

2HousePlague 08-21-2006 10:37 PM

http://profitlabinc.com/upload/files...663%5B1%5D.jpg

:)


2hp

donross 08-21-2006 10:44 PM

what do you need to build PHP SMS script??

xxxice 08-21-2006 10:46 PM

can php make it so the text that is printed on a page can all be a certain length: like 20 characters or something? what is the code?

sevent 08-21-2006 10:55 PM

Sure.

To find out the length of a string use the strlen() function.

To pad on extra characters or remove some use substr

Info about each of these at php.net. You can also treat a string like an array of characters using []. ie. $string[23] = "d";

Quote:

Originally Posted by vanderweb
can php make it so the text that is printed on a page can all be a certain length: like 20 characters or something? what is the code?


sevent 08-21-2006 10:57 PM

Search Google for php esendex

Quote:

Originally Posted by donross
what do you need to build PHP SMS script??


mfps 08-21-2006 10:58 PM

Quote:

Originally Posted by sevent
You can also treat a string like an array of characters using []. ie. $string[23] = "d";

i did not know that.

nice tip :thumbsup

sevent 08-21-2006 11:00 PM

Quote:

Originally Posted by mfps
i did not know that.

nice tip :thumbsup

Yup. Just another reason why PHP kick way more ass than that overhyped new mother fucking Samual L Jackson film.

mfps 08-21-2006 11:02 PM

Quote:

Originally Posted by sevent
Yup. Just another reason why PHP kick way more ass than that overhyped new mother fucking Samual L Jackson film.

:1orglaugh :1orglaugh :1orglaugh :1orglaugh :1orglaugh

r-c-e 08-21-2006 11:21 PM

How does Ruby on Rails compare wth PHP?

sevent 08-21-2006 11:27 PM

Quote:

Originally Posted by r-c-e
How does Ruby on Rails compare wth PHP?

Ruby on rails is the programming language Ruby plus the framework "rails". Ruby is one of the more recent programming languages of the moment with no where near the support or base of available scripts as PHP.

sevent 08-21-2006 11:28 PM

Any more questions? Final call. Anyone...? Anyone...?

xxxice 08-21-2006 11:29 PM

Quote:

Originally Posted by sevent
Sure.

To find out the length of a string use the strlen() function.

To pad on extra characters or remove some use substr

Info about each of these at php.net. You can also treat a string like an array of characters using []. ie. $string[23] = "d";

thank u :)

what do the 23 and the d stand for in this example? do i put this on any line of the code or does it need it's own line :thumbsup

sevent 08-21-2006 11:34 PM

Quote:

Originally Posted by vanderweb
thank u :)

what do the 23 and the d stand for in this example? do i put this on any line of the code or does it need it's own line :thumbsup

That was just an example. It shows how you *could* put the character "d" at the 24th place in a string*. If you wanted to pad a sting with extra characters you could do a loop which inserted a certain character at each place up to whatever.

* Remember arrays start with zero :)

footmonkey 08-22-2006 12:55 AM

Quote:

Originally Posted by uproared
Here, use this...

PHP Code:

function truncate_string($string$max_length){

    if (
strlen($string) > $max_length) {

         
$string substr($string,0,$max_length);

         
$string .= '..';

    }

return 
$string;




Looks good to me. I like seeing other people's code. :winkwink:

madawgz 08-22-2006 01:03 AM

Quote:

Originally Posted by sevent
Yup. Just another reason why PHP kick way more ass than that overhyped new mother fucking Samual L Jackson film.

damn straight :1orglaugh :thumbsup

xxxice 08-22-2006 01:09 AM

Hmm I still can't get it to work :(

Jamie 08-22-2006 01:14 AM

Quote:

Originally Posted by vanderweb
Hmm I still can't get it to work :(


That's not a question, next.

Naja-ram 08-22-2006 01:26 AM

in what ways is php better than java?
in what ways is java better then php?

teksonline 08-22-2006 01:27 AM

For the bloggers, Whats the code for getting a current date/time in a rfc 822 format?

LazyD 08-22-2006 04:18 AM

Quote:

Originally Posted by teksonline
For the bloggers, Whats the code for getting a current date/time in a rfc 822 format?

date('r');
but that doesn't always work properly (especialy when using feed validator)... so if it doesn't work use the long way : date('D, d M Y H:i:s T');

teksonline 08-22-2006 08:49 AM

ooh fire yourself T is not the answer


All times are GMT -7. The time now is 01:33 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123