Trying to figure out a way to throw out attributes in this data that do not have any values. Thanks for helping.
My current regex code , thanks to Tomalak looks like this
Regex find
([^=|]+)=([^|]+)(?:\||$)
Regex replace
<dt>$1</dt><dd>$2</dd>
Data looks like this
Bristle Material=|Wire Material=Steel|Dia.=4 in|Grit=|Bristle ...
please help to print series as well sum of series like 1*3-3*5+5*7 up to n terms i have used code like this in php
class series {
function ser(){
$i = 0;
$k = 3;
$m = 0;
for($j = 1; $j < 3; $j++) {
if($j % 2 == 0 ) {
$m = $i + ($i * $k);
} else {
...
Some days ago when using mail() I had it working.
But now I doesn't work. And I don't know what the problem is.
$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subjec...
Hello There,
Of course, we have been witnessing a lot of browsers differences in rendering elements, in displaying those, the support for CSS, the support for html/xhtml standards and more importantly different layout engines such as Trident, Tasman, Gecko, KHTML, WebKit and Presto which is mainly why there are differences.
I just wond...
I've been reading about Capistrano, Pake, and Phing and I'm just not finding what I need. It seems like these deployment packages all assume that you have full access to your deployment server, that is SSH access.
What I need is a good deployment package that works with SVN and is able to deploy via FTP or via SSH. Anything out there ab...
I found leettime via twitter, and it's novel enough for me to want to mess around with it/share it with you guys. To my dismay this version doesn't do seconds. It also seems like there might be a more efficient way to generate the time, what do you think?
Leet Time
Now, how is this leettime calculated?
For a given humanti...
I'm trying to connect to a mysql server at dreamhost from a php scrip located in a server at slicehost (two different hosting companies).
I need to do this so I can transfer new data at slicehost to dreamhost. Using a dump is not an option because the table structures are different and i only need to transfer a small subset of data (100-...
What function can I use?
...
i've got an array like this:
array[0] = "hello0"
array[1] = "hello1"
array[2] = "hello2"
now i want to get the last key '2' of the array. i cant use end() cause that will return the value 'hello2'.
what function should i use?
...
Hi i have the below table datas
id parent_id name
1 Machine
2 3 Ram
3 4 Cpu
4 Computer
5 6 food1
6 food2
My need is to select possible parents
for example
1) if we select 'machine' all others can parents
2) if we select 'cpu' then '...
i want to create a flash application that sends information to a web server and i want the information to be encrypted and secured as possible.
i know that using adobe flash media server or wowza it's possible to have some sort of javascript server side programming (asc) and sending and fetching information using the rtmpe protocol. is ...
ive got 2 dates like:
2009-11-11
2002-11-11
and i want to get the years between them '7'. how should i do that? the month and day will always be identical and i dont want to use -. is there a appropiate way for this?
...
I'm using Uploadify to upload an image to the server.
The image is uploaded, and placed in the temp folder of the web server.
Now I need to work with the file beore moving it to it's real location, and I have the following code:
// Get the filepath and filename from server temp dir
$sourceFile = $_FILES[ 'Filedata' ][ 'tmp_name' ]; /...
Hi
It looks like there are many problems with simpleXML in PHP. I'm running the latest version of php on Windows and I just can not get the basic examples of simpleXML to work as in the documentation.
My xml file is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<programme>
<title>Billy Bushwaka</title>
<episodeNumber>2</epis...
hi!!
i've to display the differences between a column(reg_time) in mysql and the present time so that the final output (after some php to display in minutes or seconds or hours or days)
be:
Registered : 8 hours ago.
is there any function to do that?
thanks
...
hi,
now i use it but now i dont have code for highlight the html cods
because there is no one in the syntaxhighlighter script that i downloaded
i use shBrushPhp.js for php
now i want one like that shBrushPhp.js but for html codes
...
$sql = "UPDATE galleries SET name='$name', desc='$desc', mainthumb='$mt'
WHERE id='$id'";
this throws an error for some godforsaken reason. I must be way too tired because I don't see it.
I've confirmed that all the values are being posted. What's worse, it's an almost exact copy any query that works fine.
Update:
This has ...
Hi,
I made this expression to remove all empty (inluding tags with just whitespace) tags in the page.
$content = preg_replace('/<[^\/>]*>([\s]?)*<\/[^>]*>/', '', $content);
It worked a treat until it had to deal with content like this...
<blockquote>
<p >foo bar</p>
</blockquote>
<p ><a href="image.jpg" rel="lightbox" title=""><im...
How can I return the first x paragraphs from a string using PHP? They're seperated by \r\n but can be put into <p></p> tags if needed.
...
How does paging work, must Flex load in all the database records to determine how many pages to generate?
Let's say I have a table with 10,000+ records and want to split it into pages of 10 records per page into a datagrid component. Does Flex load in the complete 10,000+ records, or just some of them?
I would like to use PHP and AMF ...