New Posts  All Forums:Forum Nav:

PHP wordpress plugin

post #1 of 3
Thread Starter 
I am using a plugin but modified it quite a lot. I am at the stage where it takes a peice of text and converts it to the one I want

For example:
Code:
$cross_post_content = preg_replace('/<strong>/', '[b]', $cross_post_content);
                $cross_post_content = preg_replace('/<strong>/', '[/b]', $cross_post_content);
Code:
$cross_post_content = preg_replace('/<strong>/', '[b]', $cross_post_content);

This line will replace
Code:
<strong> to [b]
. The problem is to undo strong it is
Code:
</strong>
but it give me issue, maybe because it uses backslash, can someone help?
One
(5 items)
 
  
CPUMotherboardGraphicsRAM
4790K Gigabyte Z97X GAMING G1 GIGABYTE WINDFORCE 980 16GB 
Hard Drive
Samsung 840 EVO 
  hide details  
Reply
One
(5 items)
 
  
CPUMotherboardGraphicsRAM
4790K Gigabyte Z97X GAMING G1 GIGABYTE WINDFORCE 980 16GB 
Hard Drive
Samsung 840 EVO 
  hide details  
Reply
post #2 of 3
Whats the escape character for that language? Try doing a \ before the /.
Zev's Comp
(15 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5-2500K Sandy Bridge 3.3GHz GIGABYTE GA-Z68X-UD3H-B3 LGA 1155 Intel Z68 HDM... GeForce GTX 750 Ti G.SKILL Ripjaws X Series 8GB 
Hard DriveHard DriveHard DrivePower
1TB HDD 64GB SSD (Used for SRT) 500 GB. Antec BP550 Plus 550W Continuous Power ATX12V V... 
Case
COOLER MASTER ELITE 335 RC-335-KKN1-GP Black S... 
  hide details  
Reply
Zev's Comp
(15 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5-2500K Sandy Bridge 3.3GHz GIGABYTE GA-Z68X-UD3H-B3 LGA 1155 Intel Z68 HDM... GeForce GTX 750 Ti G.SKILL Ripjaws X Series 8GB 
Hard DriveHard DriveHard DrivePower
1TB HDD 64GB SSD (Used for SRT) 500 GB. Antec BP550 Plus 550W Continuous Power ATX12V V... 
Case
COOLER MASTER ELITE 335 RC-335-KKN1-GP Black S... 
  hide details  
Reply
post #3 of 3
Thread Starter 
Quote:
Originally Posted by Mrzev View Post

Whats the escape character for that language? Try doing a \ before the /.

Thanks, got it to work by adding the \
One
(5 items)
 
  
CPUMotherboardGraphicsRAM
4790K Gigabyte Z97X GAMING G1 GIGABYTE WINDFORCE 980 16GB 
Hard Drive
Samsung 840 EVO 
  hide details  
Reply
One
(5 items)
 
  
CPUMotherboardGraphicsRAM
4790K Gigabyte Z97X GAMING G1 GIGABYTE WINDFORCE 980 16GB 
Hard Drive
Samsung 840 EVO 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding