Returning array()

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Pakcik_Kantin
New php-forum User
New php-forum User
Posts: 12
Joined: Sun Jan 19, 2003 8:35 pm
Location: Canteen

Returning array()

Postby Pakcik_Kantin » Sun Jan 19, 2003 8:40 pm

function myarr()
{
return array(1,2,3);
}

$saya=myarr();

IS THIS OK. and how can I return an array

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: Returning array()

Postby WiZARD » Mon Jan 20, 2003 8:23 am

Try this:

Code: Select all

function myarr()
{
$array_set_to = array(1,2,3);
  return $array_set_to;
}

$saya=myarr();

Pakcik_Kantin
New php-forum User
New php-forum User
Posts: 12
Joined: Sun Jan 19, 2003 8:35 pm
Location: Canteen

Ok

Postby Pakcik_Kantin » Tue Jan 21, 2003 10:10 pm

TQ.

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: Ok

Postby WiZARD » Wed Jan 22, 2003 9:06 am

Pakcik_Kantin wrote:TQ.

What do you mean?

User avatar
sarjanajava
New php-forum User
New php-forum User
Posts: 41
Joined: Wed Nov 27, 2002 10:59 pm
Contact:

TQ

Postby sarjanajava » Sun Jan 26, 2003 10:01 am

[code]
<?php
$TQ="tHANK YOU";
print ("$TQ");
?>

-----------------------------
PakCik Kanteen. Kanteen sekolah ka kantin php?


Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests

cron