i need a solution for array_replace_recursive, because my php-version isnt high enough.
i wat to use this code
$_GET = array_replace_recursive($_GET, array("amp"="&"));
easy, isnt it?
Glubber
So, I have this url in a string:
http://www.domain.com/something/interesting_part/?somevars&othervars
in PHP, how I can get rid of all but "interesting_part"?
Hi, I'm just wondering how I can retrieve a specific value (only 1 thing will be returned) from a database using php.
My query is
mysql_query("SELECT balance FROM users WHERE username = '". $this->username . "'")
I'm just looking for it to retrieve the data from that row so I can save it directory into a variable.
I have a php page that takes in a bunch of url parameters and sends out an email. I am trying to have this page call another web page using the same url parameters, after the mail is sent. If I do the following, will my email be sent reliably? Is a redirect what I really want to do?
Random code to send email...
header('Location: http://www.othersite.com/' + $_SERVER["REQUEST_URI"]);
i have the sentence
something about something WORD still something...
what is the most efficient metod to delete the word "WORD" from sentence in php?
thanks
Is there a function in php wherein you can convert the number 12 to its equivalent in a month.
For example if the mysql database stores digits and not words for dates.
how do you convert the number 12 into the word december?
We have an application that takes snapshots of certain web pages. It's quite tightly integrated into the code, so we're not ready to incorporate another library.
But we don't have a way of being able to calculate the web page height, so we end up taking snaps of 8000px height. Which is now proving troublesome when inserted into PDFs.
Is there a way to find the height of the webpage in PHP?
I've bounced around between different wrappers, my own, and using straight php mysql functions over the years but I'm sure there's a really good solution out there. What is it? :)
EDIT: Only needs to connect to MYSQL and it would be nice if it was lightweight.
Hey!
Has anybody used a good obfuscator for PHP?, I've tried some but they dont work for very big projects. They can't handle variables that are included in one file and used in another, for instance.
Or do you have any other tricks for stopping the spread of your great code? :)
I'd like for my app to be able to tell if an image hasn't been viewed in the last 30 days and remove it (along with data in the DB associated with it). I know you can have PHP read and output the image dynamically but I've heard its quite taxing on the system. Is there a way to for me to track these hits even when the image is viewed directly? (would htaccess be able to do this?) Thanks in advance.
I need to round times down to the nearest quarter hour in PHP. The times are being pulled from a MySQL database from a datetime column and formatted like 2010-03-18 10:50:00.
Example:
10:50 needs to be 10:45
1:12 needs to be 1:00
3:28 needs to be 3:15
etc.
I'm assuming floor() is involved but not sure how to go about it.
Thanks
I am using php conditions and want to know if I can run a JavaScript funtion without some one have to click on it using JavaScript:
if($value == 1)
{
javascript to run the function
}
How would I do that?
Hello, how made in PHP from format 52.593800, 21.448850 format +52° 35' 37.68", +21° 26' 55.86" like do it google http://maps.google.pl/maps?hl=pl&t=m&q=52.593800,21.448850 ?
Hello,
I have a PHP variable that holds some HTML I wanting to be able to split the variable into two pieces, and I want the spilt to take place when a second bold <strong> or <b> is found, essentially if I have content that looks like this,
My content
This is my content. Some more bold content, that would spilt into another variable.
is this at all possible?
I need to validate phone number in PHP. I have made following regex, but I also need to it to accept numbers starting with plus char, how can I do that?
^[0-9]$
Trying to parse a YouTube feed using PHP
simplexml_load_file();
I am able to access other tags pretty simply using
$xml->id;
When I try to access
<openSearch:totalResults>
with
$xml->openSearch->totalResults;
I don't get any results
Hi,
I need some advice from experts :)
I will develop a website using PHP and I will use also MySQL. I bought some server space from a Virtual private server including all the service needed.
How should I develop the site? Shall I develop it on my machine at home (using for example Wamp), and when ready transfer all the files to the server? If so what is the best method to transfer also the database?
Thanks in advance!!
i have studied design patterns and want to use them to code an open source library (not an application).
but i have never coded a library before and don't know where should i include files, should i have a bootstrap file that loads everything or should every class load their own classes they are dependent on etc.
are there any tutorials for writing libraries in php from start to finnish?
thanks
I mean an interface definition without defining the return type makes it unusable?
This makes more Clear
Interface run
{
public function getInteger();
}
class MyString implements run
{
public function myNumber()
{
}
public function getInteger()
{
return "Not a number";
}
}
In Java every Interface has a return type like Integer,String,Void
I know that PHP is unfortunately a loosly typed Language but isnt there a Solution for that Problem?
Is it Possible to defining a Interface with a Return type like Integer?
Hi,
I am storing images in mysql Db directly. what is the best way to display the image in good quality (thumbnail and original size images) using php.
For hadoop application development, are PHP frameworks less popular ?If so, why? Else,please do point literature/documentation/tutorials for a specific framework? (stuff for Symfony would be awesome!)