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 ?
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,
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]$
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
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!!
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 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.
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?
Hello, im developing a program who change his background image in function of the trending topics of twitter. So i have a function who return me a word (first TT on twitter), then i need another function that give me a url of an image relative to that word, like google images when you search or flickr. Do you know how to do this? or even better, do you have a php script made?
What is the best way to store users passwords in a MySQL database using PHP. For example, md5 or is there something better? examples would be much appreciated.
From what I know about PHP, the following syntax is not legal:
if ($s == Yes)
It should instead be written as:
if ($s == 'Yes')
However, the first example is working just fine. Anyone know why?
Hello people!
I'm a bit confused here.
I have a php array like this Array(2010,2009,2008 ...1992) and i want to create a loop to print a menu with a four year range counting down like this
2010-2006
2005-2001
2000-1996 etc..
How can i do this Everything i tried end up in an endless loop.
THnx in advance.
J.
In mod_perl i can do something like:
$ENV{REMOTE_USER} = "username";
$r->user("username");
And then the username will show up in the username section in the logs.
Is there a way to do this in php? without having to modify apache?
I am experimenting with finding similar text between a string and an online article. I am playing with similar_text() in php that shows the percentage a string matches. But I am trying to figure out how to echo out what similar_text() is finding that is similar. Is there any way to do this?
After I select the checkbox and press the button, the result data should display in the other page.I need to know the way I do this in php. My querry is working fine in the database and It shows the results.Now I need to display those results in the other page after selecting the first page checkbox and button(relevent to that checkbox).
I am trying to use PHP to make a JSON file. Part of the code is as follow
$array = array("hello", "world");
$string='{"person": [
{
"name":'$array[0];',
"age":'$array[1];'
}
]
}';
The file created. However, $array[0] and $array[1] doesn't return the values "hello" and "world" but as $array[0] and $array[1]
Any idea?
Thanks
If i have a website running php and apache, what do i need to be able to attach a scanner to it? How do i get the scanner to fill in a value on one of the webforms on my page?
Can anyone tell me if its possible to validate a link with php? By validate, I mean check if the link is active and works not just the actual format of the link.
hi,
currently i have 2 table in mysql
structure:
messages
id | content | user_id | time
submessages
id | subcontent | msg_id | user_id | time
submessages msg_id is FK for messages id.
Now i need to query from php
$cur_user = $user->current; // current user id.
SELECT * FROM messages WHERE id > '{$_GET['id']}' // problem here
how do i query submessages that posted by others not include current user?
thank you.
Hi,
Can anyone please tell if there is a simple and easy to use treeview control in php which support checkboxes?
I am looking at something that can work in IE 7 please.
I should be able to get the selected values etc.
Thanks.
Hello,
I would like to set a cookie with PHP that has to expire at the end of the month.
How can I get the number of seconds until the end of the month?
Thank you.