Is there a way to define a function in PHP that lets you define a variable amount of parameters?
in the language I am more familiar with it is like so:
function myFunction(...rest){ /* rest == array of params */ return rest.length; }
myFunction("foo","bar"); // returns 2;
Thanks!
I want to express the date in PHP as "May Fourteenth Two-thousand and ten", any ideas? Extra but not necessary would be the time like "Eight forty-eight PM"?
Im trying to find how to take a page request such as http://www.domain.com/sam/?dog=woof&cat=meow and send it to http://www.domain.com/animals.php?dog=woof&cat=meow
Ive tried a few things ive found on here, or i adapted them i should say, but i keep getting either nothing, or infinite loops.
Any ideas?
Currently my MySQL data stored like below
product | total
------------------------------------------
puma,adidas | 100.00,125.00
puma | 80.00
reebok,adidas,puma | 70.00,100.00,125.00
adidas,umbro | 125.00,56.00
How to combine, explode, merge and total it like this in php?
puma 485.00
adidas 350.00
reebook 70.00
umbro 56.00
Is there any class for it i found some classes but they were old so not working.
I need a code snippet or a class for getting msn contact list with username and password.
And is it possible sending mail via msn instead of php's mail function
I was looking at this post, and it is close to what I need:
http://stackoverflow.com/questions/1669165/php-how-to-count-60-days-from-the-add-date
However, in that post, the calculation is performed by adding 60 days to the current date. What I need to do is calculate the date based on a variable date (and not the current date).
Something like this:
$my_date = $some_row_from_a_database;
$date_plus_10_days = ???;
Anyone know how to do that?
Thanks
Is it possible to create a PHP function that takes a variable number of parameters all of them by reference?
It doesn't help me a function that receives by reference an array of values nor a function that takes its arguments wrapped in an object because I'm working on function composition and argument binding.
Don't think about call-time pass-by-reference either. That thing shouldn't even exist.
Hi, I have some errors in my output source code, I'm wondering if there is a tool that is able to look through the site and find which .tpl file my error is in? That, or at least give me a list of .tpls to look through. I can't seem to find this error and the site isn't very well documented. I'm not the best PHP programmer, I'd be looking for an online resource or something pretty simple.
Thanks very much.
I'm developing a simple web application where in I need to display number a to my users in string format.
Example:
12 - One Two or Twelve
-20 - minus Two zero or minus twenty
Either way is fine. I need this to be done in PHP. Any help will be appreciated.
Hi, is it possible to detect if flash is installed using PHP. My aim is, that if it is installed it will play a flv file, and if not it will use another player eg; quicktime? If it is possible how do I go about doing it?
Thanks
Tom
Trying a bit of AJAX, and I find that much of my data is littered with underscores!
Documentation confirms that this is working as intended. Any way to pass my form information to PHP in tact? I'm using code igniter, so my pass looks like /controller/function/variable,
receiving controller:
controller{
function($v=0){#what once was hello world is now hello_world...}
}
I can't very well do an undo, data might contain an underscore.
Thanks,
Brandon
Is there php function to remove the space inside the string? for example:
$abcd="this is a test"
I want to get the string:
$abcd="thisisatest"
How to do that? thanks.
Hi, I'm creating a PHP web app, and I want to make it secure, fast and scalable. At the start, I'm using a Shared Hosting, but I'm planning movimg to a VPS. Can you suggest me some tips, please?
I use this to pull values from a custom field with several values:
<?php $mykey_values = get_post_custom_values('services');
foreach ( $mykey_values as $key => $value ) {
echo "<li> $value</li>";
} ?>
I want to sort the output according to the way I have set up the values in the key (alphabetically)
Looking around, there are plenty of options available for form management in PHP from several frameworks: Zend, CakePHP, CodeIgniter, Symphony, and probably several others offer solutions. All else being equal, which set of form classes do you prefer? What makes any of these better than the others?
Hi,
I have a web on php5, iis6, and Oracle on windows server 2003.
I had Oracle 10.2.0.1.0 and deinstalled it. After that I installed earlier version (10.1.0) for cloning DB purposes, php doesn't work. As I understand it failes because of oci8.dll, but can't find the real problem.
Please, help.
Hello, I have a os commerce site with a ssl installed but when you go to it does not redirect you to https://www.microcomputerctr.com
Please help.
I am trying to get my products listed with Google products but it keeps disapproving me
Hi guys,
Probably, this question has been asked before, though, I'll ask it again.
Currently, I'm facing a problem with form encoding. When posting my form, all spaces are replaced by the "+" character. I would like to replace this "+" character by a real space.
Does someone has a PHP solution for this?
Thanks in advance.
Cheers, Lennart
I have a Windows Application in C#. This application interacts with a remote mySQL database. Should I create a PHP web service to do these (insert/add/delete/update) or use mySQL connector for c#? I'm not sure which way is better.
Thanks!
I'd like, for example, block every IP from base 89.95 (89.95..).
I don't have .htaccess files on my server, so I'll have to do it with PHP.
if ($_SERVER['REMOTE_ADDR'] == "89.95.25.37") die();
Would block specific IP. How can I block entire IP blocks?
Thank you very much.
Using PHP can you create a pseudo form submit without ever generating a form? Just initialize and declare variables and them pass them to another page via the POST or GET methods?