I have different outputs of $slider['image']and two examples are followings.
The first one has <p> and </p> at the beginning and at the end.
In the second one, all img tag has <p> and </p> tags.
UPDATE
<p><span>Homepage</span><img src="../../assets/images/prints/print2_600x300.gif" alt="" width="600" height="300">
<span>Content Page...
Hello! Thank you for looking at my issue, hopefully you can help me out as I'm an not well versed in writing JavaScript functions and am relatively new to using jQuery...
Anyways, I need a way to use jQuery's ajax call to asynchronously call a php script which will return a value and update the value in a header element.
Anyone know of...
It has come to my attention that a user has been trying to create an exploit through avatar image uploads. This was discovered when a user reported to me that they were getting a notice from their Norton Anti-virus saying "HTTP Suspicious Executable Image Download." This warning was referencing the user's avatar image. I don't think t...
Hello,
I have a HTML form with a variable number of select fields. Each select field represents the same category, so I named all the selects like mySelect[]. The code I wrote for getting the values is bellow:
for ($i = 0; $i < count($_POST['mySelect']); $i++) {
echo $_POST['mySelect'][$i];
}
But I don't get any results. What is ...
Let's say I have to push a change live at 8 AM EST on Tuesday May 18th - this change is across various files:
xml file
php file
30x static html files with no php processing enabled
all of these are hosted on a linux server with cron.
Is it reliable setting up a cron job to call a script which takes these files, for example:
templa...
Hello everybody, I have a form, which gathers some Information of my visitor, and when they submit the Information, it will send it to my desired email. now I need another input "file" that they can even attach their photo and send along with it to my email not on my server, I have no Idea how can I do that, I would appreciate any helps....
I have a LAMP stack with APC installed. I have a WordPress site on this server. Is WP taking advantage of the opcode caching? I have done no WP configurations. My understanding is that simply having APC installed means that all PHP code is being cached. If that is untrue, please point me to the direction where I can configure WP to take ...
Hi,
I need to keep a link tracking for an email message. I am using PHP and IMAP. I need some ID that identify the email over time. Using IMAP UID does not seems to work since the UID changes after expunge(), i know there is a message_id for emails, but how can i retrieve an email using it's message_id with PHP and IMAP?
Is there anoth...
Hi everyone,
I am trying to make a function to pull a page's content from a MySQL table using a PDO Prepare statement. My code works just fine outside of the function I defined, but no matter what I do it will not work within the function - I receive the following error:
Fatal error: Call to a member function prepare() on a non-object ...
Is it possible to have the Parent menu to be redirected to the child menu?
As an example I want this parent item page to redirect to it's children page.
My code for displaying pages as the Main Menu:
<?php wp_list_pages('exclude=3&sort_column=menu_order&title_li=&depth=1'); ?>
here is my code for listing the children menu:
<div id=...
So here is my code:
<?php
$arr = array(array(2 => 5),
array(3 => 4),
array(7 => 10));
foreach ($arr as $v) {
$k = key($v);
if ($k > 5) {
// unset this element from $arr array
}
}
print_r($arr);
// now I would like to get the array without array(7 => 10) member
As you can see, I start w...
Using the newer PHP pecl/memcached extension. Calls to Memcached::setOption() like;
$m = new Memcached();
$m->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT);
are costing between 150 to 500ms - just in making the call to setOption() and as we're not using persistent connections but rather doing this on every...
Hey All,
Like always, just want to say thank you for all of the help and input in advance.
I have a particular site that I am the web developer for and am running into a unique problem. It seems that somehow something is getting into every single PHP file on my site and adding some malware code. I have deleted the code from every page ...
I am working on a project that will take XML data submitted through a textarea input in a form then extract the data and throw it into a database. I am getting errors about the attribute in the root field of my XML (it is the same schema each time, but with different values). If i remove these attributes it works fine, but I don't want t...
So we got this function in PHP
strcmp(string $1,string $2) // returns -1,0, or 1;
We Do not however, have an intcmp(); So i created one:
function intcmp($a,$b) {
if((int)$a == (int)$b)return 0;
if((int)$a > (int)$b)return 1;
if((int)$a < (int)$b)return -1;
}
This just feels dirty. What do you all think?
this is par...
I am relatively new to php and have a feeling that I am going the long way round when displaying data from mysql.
I have a table a I want to show a few fields from my database.
How would I achieve this without having to echo every bit of the table???
Here is the code:
<?php
$query1 = mysql_send("SELECT firstname, lastname, email...
it's weird but I can't find anything equivalent to http://www.bonitasoft.com/ for php
...
I have just installed Debian Lenny with Apache, MySQL, and PHP and I am receiving a PDOException could not find driver.
This is the specific line of code it is referring to:
$dbh = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS)
DB_HOST, DB_NAME, DB_USER, and DB_PASS are constants that I have defined. It work...
Do you know any php statement working like python's pass
...
Hello,
We have a need to access a DB that only allows one connection at a time. This screams "singleton" to me. The catch of course is that the singleton connection will be exposed (either directly or indirectly) via a web-service (most probable a SOAP based web-service - located on a separate server from the calling app(s) ) - which ...