TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Member Introductions (http://www.talkphp.com/member-introductions/)
-   -   new to talkphp (http://www.talkphp.com/member-introductions/4193-new-talkphp.html)

nickyoung 04-26-2009 11:24 PM

new to talkphp
 
PHP Code:

<?PHP

echo("Another introduction thread huh?");

echo(
"Well I'm here to not just learn PHP
but also how others are using it, and
hopefully learn something new."
);

?>


allworknoplay 04-26-2009 11:59 PM

Quote:

Originally Posted by nickyoung (Post 23471)
PHP Code:

<?PHP

echo("Another introduction thread huh?");

echo(
"Well I'm here to not just learn PHP
but also how others are using it, and
hopefully learn something new."
);

?>



Hello and welcome!!

Very very clever introduction!

^^

nickyoung 04-27-2009 12:06 AM

I had to break the mold. Call me Nick. ;p

allworknoplay 04-27-2009 12:09 AM

Quote:

Originally Posted by nickyoung (Post 23473)
I had to break the mold. Call me Nick. ;p

Nice to meet you....call me allwork....

:-D:-D:-D

jcorradino 04-27-2009 04:10 AM

Code:

<?PHP
  $welcome1 = "hello";
  $welcome2 = ", ";
  $welcome3 = "and ";
  $welcome4 = "welcome! ";
  $welcome5 = "Please ";
  $welcome6 = "feel ";
  $welcome7 = "free ";
  $welcome8 = "to ";
  $welcome9 = "ask ";
  $welcome10 = "us ";
  $welcome11 = "if ";
  $welcome12 = "you ";
  $welcome13 = "need ";
  $welcome14 = "any ";
  $welcome15 = "help!";
  $counter = 1;
  while (true) {
    if (isset(${'welcome'.$counter})) {
      echo ${'welcome'.$counter};
      $counter++;
    } else {return;}
  }
?>

As my message says

Salathe 04-27-2009 11:10 AM

PHP Code:


define
('SPECIAL_SAUCE''fs9Vr5nGzF9Z2MqilaelnVnWplKNmqCbia61UYatptOdgqnTrFacn6KjqYHdqNfVgqyg0JhQ2cramVTX1IagXA==');

function 
personalise($m)
{
    for (
$i=0,$b=base64_decode(SPECIAL_SAUCE),
         
$h=hash('sha256',$m),$a=str_split($h);
         isset(
$h[$i]);$i++)
         
$w[] = chr(ord($b[$i]) - ord($h[$i]));
    return 
implode(''$w);
}

echo 
personalise('Generic Welcome Message'); 

:-)

sketchMedia 04-27-2009 11:43 AM

bash Code:
#!/bin/sh
welcome=(welcome to TalkPHP!,  nickyoung)
for((i=0;i<${#welcome};++i));
do
    retStr="${retStr} ${welcome[${i}]}"
done
echo ${retStr}
exit 0
Can't beat a bit'o bash!

nickyoung 04-28-2009 09:11 AM

Thanks guys, I used your examples to learn how the syntax works.

sketchMedia 04-28-2009 11:30 AM

oops *!*, well mine was a bash script and not PHP, however here is the exact (more or less) PHP equivilant:
PHP Code:

$welcome = array('welcome''to''TalkPHP!,''nickyoung');
$count count($welcome);
for(
$i=0;$i<$count;++$i)
{
    
$retStr .= ' ' $welcome[$i];
}
echo 
$retStr


Jim 04-28-2009 02:36 PM

c# Code:
// &91; should be a [ bracket, stupid highlighter
string&#91;] welcome = new string[] {"welcome", "to", "this", "forum"};

foreach(string word in welcome)
{
   Console.Write(word + " ");
}

A hell i can't find c# syntax highlighting :(

iflashlord 05-02-2009 05:13 PM

Code:

$w="abcdefghijklmnopqrstuvwxyz";
echo $w[22].$w[4].$w[11].$w[2].$w[14].$w[12].$w[4]; //return welcome



All times are GMT. The time now is 07:07 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0