Yes, it's a simple question, but one that I can't find a answer for through the PHP documentation or Google. (I'm just learning PHP....)
If this works:
<?php $d=date("D"); if ($d="Mon") { ?>echo this text on Monday<?php endwhile; ?><?php } else { ?><?php } ?>
Why doesn't this?
<?php $d=date("D"); if ($d="Mon,Tue") { ?>echo this text...
Hello
Can anyone list the requirements for building a Store Manager Windows Application for an Online PHP Store.
For e.g. here is an windows application which manages an online store:
hXXp://www.pinnaclecart-manager.com/
I am familiar with Java and PHP.
Can anyone list the requirements (i.e. any books, tutorials, libraries etc) to bu...
Can someone please explain what the "?" and ":" operators are in PHP?
e.g.:
(($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER)
...
Hi,
I am not sure if Exceptions work the same way in each language, but I am using PHP and I was wondering when I'm doing something like this:
if (!$this->connection[0]->query($this->query))
throw new QueryFailedException($this->connection[0]->error);
Is there a need to supply a code in the second parameter? For example:
if (!$this...
Does it possible to execute php file and store its output into some variable?
For example i have one global template, then i need to process subtemplates, and afterall i need to insert that subtemplate output into global template block.
How can i do it ?
...
I'm writing an in-house module to generate a small LaTeX PDF. Within the module, how do I use PHP to utilize the command line?
...
I am writing some plugins and themes for WordPress, and I finding it to debug because somehow by the time the page has loaded, $_GET, $_POST and $_REQUEST are all empty. Even with error reporting set on, I am not getting error messages either other than a blank page whenever there is a fatal error. Is there anyway to enable a 'debug mode...
I have a list of images that need to be displayed. However theres only space for 5. I need to display 5 of these at a time randomly.
Whats the best way to do this?
...
I have some really funky code. As you can see from the code below I have a series of filters that I add to query. Now would it be easier to just have multiple queries, with it's own set of filters, then store the results in an array, or have this mess?
Does anyone have a better solution to this mess? I need to be able to filter by keywo...
I'm currently in the process of setting my website, largely with php. Though this is my first time using it so I'm running into some problems.
I've got the basics of the site down. Registering, login-in, profile page e.t.c. However this is where I seem to have to make a decision about the site layout.
For instance. Currently a user's p...
Hey!
I got this script called "rapidshare link checker v2 php by Bigfish"
At the moment the script checks the links inside $links = " ". I would like it to check all the megaupload links on the page.
If that doesnt work it would be ok if you guys help me make some changes so the script ignores all code except megaupload links.
The scri...
Thank you one and all ahead of time.
I am currently in the process of tweaking/improving a MVC framework I wrote from scratch for my company. It is relatively new, so it is certainly incomplete. I need to incorporate error handling into the framework (everything should have access to error handling) and it should be able to handle diffe...
I have two tables, one called "cart" and one called "items". Now I want cart to be able to store a list of "items" and quantities. So I created another table "cart_items" that has a field for the id of the template, the id of the item and the quantity.
Is this good design, or should I add another field for the id of the "cart_item"? Or...
What is the best PHP framework to make applications has an Oracle database?
...
I have some data in a database that I need represented in an XML file, but the data is different for each request, so the XML file is generated through PHP. For example purposes, let's say this is the text in the db:
Hello & Goodbye
I've tried using the following to get the above (set to the $example variable) to show up as Hello &...
I have an multidimensional array that looks like this:
Array
(
[0] => Array
(
[ClientID] => ec2173de2134fdsfg4fsdffcb4b5205
[Name] => ABC Widgets
)
[1] => Array
(
[ClientID] => e5dfgfdg2d760f640aadfgdfgdfg47b
[Name] => Acme Co
)
[2] => Array
...
Is there a way to read off from an [external] xml (an xml file from a different website) using PHP? I know there's a way to read XML using JavaScript, but only if they are both in the same root.
Could you provide an example on how to source the xml file, then read the following:
<parent>
<child>
<grandchild>Example Text 1</...
I'm trying to sanitize/format some input using regex for a mixed latin/ideographic(chinese/japanse/korean) full text search.
I found an old example of someone's attempt at sanitizing a latin/asian language string on a forum of which I cannot find again (full credit to the original author of this code).
I am having trouble fully underst...
I am developing a video website (PHP - MYSQL), just like youtube, in which I want to provide the functionality of Next video and Previous video. Let's say I am currently on videoId: 234 so Next and Previous video links will point to videoId: 233 and 235 respecively.
My table structure is as follows:
videoId videoName videoURL ...
I've run into this problems several times before when trying to do some html scraping with php and the preg* functions.
Most of the time I've to capture structures like that:
<!-- comment -->
<tag1>lorem ipsum</tag>
<p>just more text with several html tags in it, sometimes CDATA encapsulated…</p>
<!-- /comment -->
In particular I wa...