LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-26-2020, 02:30 PM   #1
droid.c3p0
Member
 
Registered: Sep 2016
Location: Bulgaria
Distribution: MX Linux
Posts: 73

Rep: Reputation: 3
PHP function with parameter


I need to use a PHP function. ( I have never used a PHP function. )
First call of function will be with parameter Array containing 49 string elements;
Second call of function will be with parameter Array containing 35 string elements;
May be in the future will use function with parameter Array containing ## string elements;

Help about declaration and usage of that kind of function will be great.
 
Old 11-26-2020, 03:38 PM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Code:
function myfun($par1) {
...
}

$par1= array('str1', ..., 'str39');
myfun($par1);

Last edited by NevemTeve; 11-26-2020 at 03:40 PM.
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Javascript - Calling a Function With a Function Parameter killingthemonkey Programming 9 11-15-2016 05:14 AM
[SOLVED] Scheme -> Lisp. How can I pass a function as parameter to another function ? muggabug Programming 2 12-26-2012 10:23 AM
Compilation issue when Function is parameter in function call on LINUX sa20358 Linux - Software 2 07-24-2008 10:19 PM
( C ) How do you declare a function pointer where a parameter is a function pointer? spursrule Programming 5 11-27-2007 07:56 PM
Passing one php function result as a parameter to another php function davee Programming 13 09-12-2004 12:08 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration