<description><img src='http://example.com/Pic_018_70x70.gif'&gt;&lt;/img&gt;&lt;br />This is the content of the description.</description>
If I have images coming in the description field of a feed, how can I separate the image into a variable and strip the noise and have the description left too?
...
i'm developing a web application that focus heavily on ajax. the whole application is just on one page except for the threads that are in traditional pages so they can be indexed.
so i have to have very structured JS-codes and i wonder if they are any frameworks out there that are for ajax-based applications.
eg. codeigniter, cakephp a...
I have been given the task of finding a replacement for a piece of old code. I'm assuming it tested to see if the browser supports 128-bit encryption. Here's the old code: (I purposely split the link into 4 lines)
http://www.verisign.com/update-cgi/outPage.exe
?good=../docs/html/good.html
&nsbad=../docs/html/upgradeNSonly.html
&ie2=../d...
I have some XML to work with, something like this:
<admin_list>
<admin>
<name>user1</name>
<authentication_source>Local</authentication_source>
</admin>
<admin>
<name>user2</name>
<authentication_source>Local</authentication_source>
</admin>
</admin_list>
I can't seem to retrieve a specific ad...
I have a php script that is rather hairy and I'm trying to troubleshoot it. No errors are happening, but I'm having trouble seeing what execution path it took to create the output I've gotten. Is there a way I can see at what line the script stopped execution?
Folks, sorry I didn't make this clearer. No errors are happening. No except...
I am trying to find values inside an array. This array always starts with 0.
unfortunately array_search start searching with the array element 1.
So the first element is always overlooked.
How could I "shift" this array to start with 1, or make array-search start with 0? The array comes out of an XML web service, so I can not rally modi...
So, I would like a select to auto-populate the dropdown's "Yes" selection, or alternatively, the "No". The returned value from a database query will be used to evaluate which dropdown will be selected.
I have thought since it's a true/false auto-population to just write 2 conditionals, but I thought there would be a better (read: less m...
it was always a question for me that how can i use an array value in javascript while that array is defined in my php scripts
For example consider reading some values from a file and use it in javascript.
what's ur plan to do so ?
...
Does anyone know the formal / official name of the checksum algorithm used in the following functions?
function Checksum($number, $encode = true)
{
if ($encode === true)
{
$result = 0;
$number = str_split($number, 1);
foreach ($number as $value)
{
$result = ($result + ord($value) - ...
Hello All,
I am creating a simple plugin in wordpress this is a simple form with three fields that will save data to a database table. Plugin is activated successfully, but when i fill the form and press button to submit, it shows me a blank screen with error "You do not have sufficient permissions to access this page." i am stuck here. ...
I am trying to install a PEAR package into my recent XAMPP PHP installation (PHP 5.3.1) on Windows 7 64-bit.
Installing new packages fails because PEAR tries to access c:\windows\pear.ini instead of the existing c:\path_to_xampp\php\pear.ini. This results (rightly) in a permission denied error. I am logged on as Administrator, but the W...
If you simply add the code it doesn't do the automatic action wireup in the .zfproject.xml file. Does the IDE support a way to add additional Actions to an existing controller without manually using the command line tool?
Adding the following information:
I was actually looking for a built in way to update the zfproject.xml without usi...
I'm attempting to run preg_match to extract the SRC attribute from the first IMG tag in an article (in this case, stored in $row->introtext).
preg_match('/\< *[img][^\>]*[src] *= *[\"\']{0,1}([^\"\']*)/i', $row->introtext, $matches);
Instead of getting something like
images/stories/otakuzoku1.jpg
from
<img src="images/stories/otak...
I installed PHP/FastCGI and Mysql on w2k8 64bit IIS7.
PHPinfo() loads fine, and MySQL extension is properly installed. PHP displays echo commands.
MySQL also works fine through the MySQL Command Line Client. I can create DBs, tables and users.
However MySQL does not respond and the PHP script times out when simply connecting with mysq...
I have a very strange problem.
Situation: Session handling over MySQL, PHP 5.2.4, wildcard cookies, FF/Opera/Safari/Chrome works, IE7/8 not.
When I save a variable into the session, the value is lost. The DB shows after the write action only "N" instead of "123456".
Example:
$bar = 123456;
$_SESSION['foo'] = $bar;
But when I save a...
I am using the Zend MVC framework along with an ORM layer generated with Propel, and I'm trying to figure out the best way to catch exceptions from a Propel object's save() function, and throw them to the Zend Form as errors.
Not all of the exceptions that come out of the Propel object have a way to identify which field caused the error...
I am a lone developer most of my time, working on a number of big, mainly PHP-based projects. I want to professionalize and automate how changes to the code base are handled, and create a Continuous Integration process that makes the transition to work in a team possible without having to make fundamental changes.
What I am doing right...
I want to use http://wiki.developers.facebook.com/index.php/Fb:tabs and have the tabs load/change dynamically using AJAX. Are there any examples online or would anyone be kind enough to post an example here?
Thanks!
...
hey there
Maybe this isn't the right place to ask, but I was wondering if there is any advice on how to start fixing an old-fashioned-style php script.
A few days ago I received an offer for developing an old PHP project, and by old-fashioned I mean the structure did not use OOP coding method and it doesn't have a definite framework...
I'm trying to output some HTML in an XML template and Symfony's escaping method is messing it up. So I tried making a copy of settings.yml in the module's config folder, but it seems to be completely ignored. Is there an easy way to change the escaping_strategy and/or escaping_method settings per module or even per tample?
...