Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Returning array()

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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
Pakcik_Kantin
New php-forum User
New php-forum User
 
Posts: 12
Joined: Sun Jan 19, 2003 8:35 pm
Location: Canteen

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();
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Ok

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

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

Re: Ok

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

Pakcik_Kantin wrote:TQ.

What do you mean?
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

TQ

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

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

-----------------------------
PakCik Kanteen. Kanteen sekolah ka kantin php?
User avatar
sarjanajava
New php-forum User
New php-forum User
 
Posts: 41
Joined: Wed Nov 27, 2002 10:59 pm


Return to PHP coding => General

Who is online

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

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.