i've got an id attribute value for an element.
i want to select only its children (not all descendants).
i used
$childElements = $xml->xpath('//entity[@id=212323]');
print_r($childElements);
but that would select ALL descendants and print them out. i just want to select the 1 generation children. how could i do that?
<entity id=212...
Are regular expressions the same for PHP, MySQL, JavaScript, Perl, and so on? If so, is there a chart or tutorial that explains regular expressions?
...
Ok, this may be confusing so I hope I explain it correctly.
I have 4 tables:
business
photos
video
category
I want to display "featured" businesses on the home page (or elsewhere) and I want to show a Yes or No in the table row based upon whether or not there are photos or videos for that business.
Example: Joes Crab Shack has no vid...
Hey, I'm still trying to get my pagination links to load properly dynamically. But I can't seem to find a solution to this one problem
the problem I am having is when I click any of the pagination number links to go the next page, the new content does not load. literally nothing happens and when looking at the console in Firebug, nothin...
i would like to learn how to make PHP/CSS syntax generator. i assume this going to be fun and all. Is there any open source PHP/CSS syntax generator ?
Or at least, where the best syntax generator available in internet based on your experience ?
...
So I have a simple Apache with MySql I am developing a PHP app. I have Users Table in my DB. I vant to let them store Icons.
My question Is what's the best way of attaching such data as icons (100-250kb's) to DB - Is it beter to store them Inside DB or store them as File and some how attaching links to icons into DB. What's the best way...
What does the $/i mean in the following php code?
preg_match ('/^[A-Z \'.-]{2,20}$/i')
...
I am having trouble understanding the terms of the LGPL in light of a program that is not written in C or C++. They speak of libraries being linked and 'derivitive' works. If I were to package a php program and sell it, but within the program the deployment mechanism used the phing package (full up with the entire contents as is and un...
When I encrypt with C# I get arTdPqWOg6VppOqUD6mGITjb24+x5vJjfAufNQ4DN7rVEtpDmhFnMeJGg4n5y1BN
static void Main(string[] args)
{
Encoding byteEncoder = Encoding.Default;
String key = "ShHhd8a08JhJiho98ayslcjh";
String message = "Let us meet at 9 o'clock at the secret place.";
String encryption = Encrypt(message, key, fa...
Update 2: So I never have used the debug function in firebug, but I just looked at the script section and I get this, now I will try and figure this out.
Failed to load source for:
http://localhost/googleMap/phpsqlajax_genxml.php
Hiya,
I followed this tutorial below
http://code.google.com/apis/maps/articles/phpsqlajax_v3.html#ou...
Hello,
From a MySQL table called "submission" containing the fields "loginid, submissionid, title, url, datesubmitted, displayurl", I would like to print an HTML table thats contains all "title" and corresponding "datesubmitted" where "loginid" equals "$profile." The code I am trying to use is below. It isn't working. Any ideas why i...
Recently I need to make a chart of employees' workload.Any recommendation?
Thanks.
...
I was wondering if the codes below are the correct way to check for a street address, email address, password, city and url using preg_match using regular expressions?
And if not how should I fix the preg_match code?
preg_match ('/^[A-Z0-9 \'.-]{1,255}$/i', $trimmed['address']) //street address
preg_match ('/^[\w.-]+@[\w.-]+\.[A-Za-z...
Hello,
Is it possible to "deny from all" apache htaccess style using php.
I can't use htaccess because im using different webserver, so i wan't to use php to workaround it.
So let say user are trying to access folder name 'david', all content and subdirectory are denied from viewing.
...
Hi there!
I'm trying to do a little PDO CRUD to learn some PDO. I have a question about bindParam. Here's my update method right now:
public static function update($conditions = array(), $data = array(), $table = '')
{
self::instance();
// Late static bindings (PHP 5.3)
$table = ($table === '') ? self::table() : $table;
...
Hi,
I have a sign up page written in php, that goes to a confirmation page after processing. In the confirmation/ thank you page there is a 3rd party script that counts the number of successful registrants. how would I limit the script to be loaded per successful registration?
...
is there any script for indic translation like google translator..
...
Hey, I'm using php 5 and need to communicate with another server that runs completely in unicode. I need to convert every string to unicode before sending it over. This seems like an easy task, but I haven't been able to find a way to do it yet. Is there a simple function that returns a unicode string? i.e. convert_to_unicode("the string...
Hey,
I'm not sure how difficult this but I have an array and would like to put it into and html table.
I need to have two array strings per row, so if this were the array:
$array1 = array(
1 => 'one',
2 => 'two',
3 => 'three',
4 => 'four',
5 => "five",
6 => 'six',
);
And I need the html table to lo...
Would it make sense to switch to HipHop instead of XCache?
Is HipHop ready for primetime or should we wait several months before implementing it?
Edit: we are interesting in testing the configuration on a server running vBulletin.
...