I know this may seem like a common question on SO but I could not really find anything in particular to my exact question.
Just throwing some of my thoughts so far out there, PHP is super super easy and FAST to code in, I do not know C# or how to use ASP.net, I would like to learn it and studying some of it briefly it seems to me that...
I'll be the first to admit that PHP is not my forte and this array is starting to drive me nuts.
This is the array I'm attempting to enumerate:
// array containing the site menu
$sitemap = array(
array( 'Title' => 'menu01',
'Description' => 'menu01_description',
'Address' => 'http://localhost/site.php?page=menu01',...
I need to get all the posts on a certain date, and then parse the post content. How would I grab the posts by specifying a specific date? I'm assuming I need to use the get_posts() function, but I'm not clear as to how to format that call.
...
What's the best way to localize a PHP page? We have several PHP pages that need to be deployed to other countries. They are hard-coded in English now. I am looking for a mechanism to externalize the text and localize it.
Something like ResourceBundle in Java would be great. We don't use any frameworks.
...
Here is an example:
for($i=1; $i < 10; $i++){
$marray[] = array($name, $email, $password); // Lets just say for now, there is real
// data for each online being input
}
foreach ($marray as $e){
echo "Name: ". $e[0];
echo "Email: ". $e[1];
}
I forgot to mention:
This script works ...
Essentially I need to retrieve some account information from the dbase table where they have a client of the client that has been passed via GET, and the account placement date (dateplaced) is between the start and end dates passed from calendar fields again via GET.
The query below returns no rows. I have verified that the SELECT and F...
I would like to have a function that could display how many months it's been since a special date – with decimals if possible.
Anyone have an idea on how to make it? (In PHP)
I ended up doing the following:
$var = ((mktime(0,0,0,8,3,2009) - mktime(0,0,0,9,3,2009))/86400/30.4368499);
Your answers were helpful. James Goodwins was the on...
I'm using references to alter an array:
foreach($uNewAppointments as &$newAppointment)
{
foreach($appointments as &$appointment)
{
if($appointment == $newAppointment){
$appointment['index'] = $counter;
}
}
$newAppointment['index'] = $counter;
$newAppointments[$counter] = $newAppointment;
$counter++;
}
If I print the arra...
I have SVG files, which I'd like to:
export and use as custom ground overlay with flat Euclidean projection (econym.org.uk/gmap/example_custommapflat.htm).
take only polygons and project them on Google Map
My SVG files have some rules in common:
they all are 4096x4096px
main objects of the map are centered
I have done some experi...
Howdy again Stack Overflowers,
I have this feed that I want to store the session_id in that xml file as a string to play with outside the loop, what am I doing wrong?
if($xmlobj = simplexml_load_string(file_get_contents($xml_feed)))
{
foreach($xmlobj as $listing)
{
echo $session_Id = $listing->session...
I am using errordocument in .htaccess to redirect a certain not found case to my processing script. This particular not found contains post data, but I cannot access it in my processing script. The content-length header is set, but the data is not available in $_POST or in php://input.
Using liveheaders, I can see that there are only tw...
I've been bumping into a problem. I have a log on a Linux box in which is written the output from several running processes. This file can get really big sometimes and I need to read the last line from that file.
The problem is this action will be called via an AJAX request pretty often and when the file size of that log gets over 5-6MB...
I have a project we are about to wrap up, but just got a request from the DBA to make all our connections SSL. So I switched the driver to mysqli in the object that turns out ADODB instances, but I don't see any native method to create secure connections.
To make things more difficult, there is a different set of certs and keys per con...
I'm trying to extend my controllers with a global base controller as such:
class BaseController extends Zend_Controller_Action {
// common controller actions
public function listAction() {
// do stuff
}
}
class IndexController extends BaseController {
// index controller specific actions
}
class LoginController exten...
Hey guys -
this is a question on PHP mainly. I was wondering: How do you make sure that all necessary libaries are packaged with your application when you do a deployment to (production) servers?
A more concrete example: I have an app running on Zend Framework and each time I roll the application to a server the deployment process crea...
I'm developing a store location application.
Looking up a store, it currently shows the location in googlemaps based on address and zip code.
Now I want to build a function which also shows other shops within 500 meter radius.
To do this, I have to do a proximity search / calculation.
My biggest question, is how I should approach this...
Have a form that is not being read by serialize() function.
<script type="text/javascript">
function submitTrans1(){
var formData = $('form1').serialize();
var options = {
method:'post',
postBody:'formData',
onCreate: function(){alert(formData)},
onSuccess: function(transport){alert("onSuccess alert \n" + transpo...
I have a php function that I wish to reduce even further.
<?='Testing'?>
Is there a way to reduce this any further?
...
Hello all,
I recently setup a server using the latest version of XAMPP for Windows. With it came PHP 5.3. I'm now looking for a memcache.dll file that works with PHP 5.3 I've used some of the previous .dll files and recieved an error message:
"PHP Startup: memcache: Unable t initialize module.
Module compiled with module API=20060613...
I am trying to construct a regex based router for a MVC framework I am working on. I was very fond of the way Django handled urls in urls.py, and would like to create something similar. Does anyone have any code / examples of how I can create an array of regular expressions which my router can 'process' to instantiate the controller (or ...