Monday, September 4th, 2006 (updated 5 Oct ’10)

PHPStringFun v1.2.1 (Free)


This widely-installed ExpressionEngine add-on is a general-use text-formatting plugin that enables access to PHP string functions without activating PHP in the template.

Why would you not want to activate PHP in your template? One important scenario for the plugin is that you actually have activated PHP, but set to parse at the input stage, while you need something else done in the same template requiring PHP to be set at the output stage. Also, people just like using it, particular in templates where not much PHP is needed.

The download file contains a version of the plugin for both EE v1.x and v2.x.

Threads at the ExpressionEngine Forums where PHPStringFun is mentioned as a solution:


Tue 14 Sep ’10


When using the explode function how would print the array? The tag just outputs “array”

Tue 14 Sep ’10

Adam Khan

This problem has come up before (see—I’ll take a look and see if I can figure out what’s happening.

Tue 14 Sep ’10


Thanks Adam. I want to explode a custom field of ids (123|43|75) so I can use them separately. If the explode function returns an array I don’t understand how phpstringfun would handle that.

Wed 15 Sep ’10

Adam Khan

Yes, it would have to check whether the result is an array and if so, output it as an array, taking a new parameter as the separator character.

Wed 15 Sep ’10

Adam Khan

Mike, I’ve updated the plugin to allow output from explode, but I think phpstringfun is not really worth using for that. To be honest, I never use the plugin myself. I find it easier to just use PHP wherever required in an EE template. The majority of my EE templates have PHP enabled.

I use explodes whenever necessary combined with foreaches. I generally keep PHP at the default output parsing stage, and if that makes a PHP variable inaccessible, I just embed a template and pass the PHP variable.

Wed 15 Sep ’10


Thanks Adam! I’ll give both a try

Wed 15 Sep ’10


Thanks Adam, I’ll try both methods.

Sun 26 Sep ’10


New to EE here, I am getting the error:

Fatal error: Call to a member function fetch_param() on a non-object in / [ …edited…] system/expressionengine/third_party/phpstringfun/pi.phpstringfun.php on line 36

My call looks like:

{exp:phpstringfun function=“ucwords”}{field_x}{/exp:phpstringfun}

What am I doing wrong?

Sat 2 Oct ’10


Hi Adam,

I\ve just upgraded PHPStringFun in EE2.1 from version 1.1 (EEv1) to version 1.2 (EEv1) and immediately got the same error as Dean mentions above on one of the pages of my site that uses this plugin:

Fatal error: Call to a member function fetch_param() on a non-object in /home/myaccount/public_html/mysystem/expressionengine/third_party/phpstringfun/pi.phpstringfun.php on line 36

Here’s the code I’m using in the template that’s causing this (which worked fine and without error with the previous version):

{exp:phpstringfun function=“urlencode”}{page_uri}{/exp:phpstringfun}

Not sure if this is a bug with the latest version, or if I’m doing something wrong with my code/tags that has now been tightened up on with the new version?



Tue 5 Oct ’10


I am also haveing problems with phpstringfun as the 2 users above:Fatal error: Call to a member function fetch_param() on a non-object in /home/myaccount/public_html/mysystem/expressionengine/third_party/phpstringfun/pi.phpstringfun.php on line 36

Tue 5 Oct ’10

Adam Khan

My apologies people, I’ve been swamped with work and didn’t have time to get to this.

Turns out I didn’t test the plugin properly in EE2. The fatal error is now fixed in v1.2.1.

Wed 6 Oct ’10


Thanks Adam! Having issues downloading the new 1.2.1? I get the the agree button, then I get an url doesn’t exist error?

Wed 6 Oct ’10

Adam Khan

Oops, file renamed correctly.

Sun 28 Nov ’10


When I download the file, all I get is the EE1 version. I would love to get my hands on the EE2 version!


Thu 23 Dec ’10


Hi adam,

I would like to use str_replace. but I couldn’t find example.

{exp:phpstringfun function=“str_replace” par1=”.jpg”  par2=“_t.jpg”}{photo}{/exp:phpstringfun}

But it doesn’t work.
So, could you give me correct example?

Mon 10 Jan ’11

Adam Khan

Uno, sorry for the delay in replying—I’ve been out of commission.

PHP’s String Replace function has as its parameters $search, $replace, $subject, so it would help to use the plugin’s reverse parameter then do as follows:

{exp:phpstringfun function=“str_replace” par1=“_t.jpg” par2=”.jpg” }{photo}{/exp:phpstringfun}

Sun 16 Jan ’11


For some reason it doesn’t seem to be working with nesting. Am I doing something wrong?

{exp:phpstringfun function=“htmlentities”}{exp:phpstringfun function=“nl2br”}{title}{/exp:phpstringfun}{/exp:phpstringfun}

Sun 3 Apr ’11


Hi Adam,

I’m trying to use PHPStringFun (v1.2.1 on EE 2.x) on a segment in a title element, using the ucwords function, but it’s not applying anything:
{exp:phpstringfun function=“ucwords”}{segment_2}{/exp:phpstringfun}

I’ve changed the function to “strtoupper” and it works fine.  If I change the {segment_2} to a hardcoded string, e.g.:
{exp:phpstringfun function=“ucwords”}this is lowercase{/exp:phpstringfun}
then I get the correct desired result.

Any suggestions as to what I’m doing wrong?

Hopefully the solution is staring me in the face!

Fri 3 Jun ’11


I’m having the same problem as Clair, is there a way of chaining functions?

I’m trying to replace spaces with ‘-’ and make it lowercase, but just the closing tag is displayed.

Wed 15 Jun ’11


Just noticed that “addslashes” function doesn’t exist in this plugin, but “stripslashes’ is in there.

It was really easy to add it to the plugin.

Just thought you might want to update that little thing.

Wed 20 Jul ’11


This worked well for me but it would be really nice if it worked with nesting.

Fudged my way around it with what I needed to do but its ugly and I can see a situation arising where I will have to nest some of these functions and be SOL.

Mon 8 Aug ’11


Desperately needs nesting..

Mon 15 Aug ’11

Tom Chapin

When I extracted the archive for phpstringfun 1.2.1, I was confused because there was only one file (“pi.phpstringfun.php”) contained inside and I couldn’t tell if it was the file for EE1 or EE2.

I went ahead and created a folder in my EE2 installation at /system/expressionengine/third_party/phpstringfun/ and I placed the pi.phpstringfun.php file there inside it. Everything seems to be working correctly when I tried it out.

Tue 20 Sep ’11

Sten Van den Bergh

str_replace also doesn’t work for me. It replaces the whole word with the par2 parameter. So this code:

{exp:phpstringfun function=“str_replace” par1=“o” par2=”+” }hello world{/exp:phpstringfun}

outputs “+”

Wed 5 Oct ’11

Allan White

A question about this plugin (and by extension, the PHP functions it enables): Can it encode/escape for Javascript? I need to inject some HTML into a JS function that’s part of an EECMS template, and it would be soooo slick to do it on the fly.  Example of the formatting here: It seems different than HTML entity encoding. Thanks! Neat concept.

Sat 15 Oct ’11


Explode won’t work with a array_index of 0 because 0 is false…

if ($array_index)
if (isset($array_index))


Sat 15 Oct ’11



Be aware that ee trims the params or something so par1=” : ” won’t work :(

Wed 29 Aug ’12

Nathan Pitman

Hi there, I’ve been using this plug-in for a while on a site but a recent server upgrade to a more current version of PHP has the substr_count function playing up. I’ve not been able to nail the exact cause but it seems that the addition of the offset parameter might have something to do with it. :)

Thu 25 Oct ’12

Frank Heijkamp

I had problems with the plugin under EE version 2, had to comment all version 1 code out. Is it only me having this problem?
  //  global $TMPL;
  //  $version = “”;
  //  if ( $TMPL )
  //  {
  //      $version = “1”;
  //  }
  //  else
  //  {
  //      $version = “2”;
  //  }
  //  if ($version == “2”)
  //  {
  //      keep EE version 2 code
        $this->EE =& get_instance();
        $TMPL = $this->EE->TMPL;
  //  }

Mon 21 Mar ’16


good iTube Apk is a fairly exciting minute sized apk which lets you just download YouTube videos straight to the internal or itube free download This can be the main use of iTube from my perspective. iTube Music nice.

Mon 21 Mar ’16


good Andy these two or Bluestacis are greatest android emulators which enables user to run smart phone program into pc. Download Mobdro on PC It’s possible for you to go its webpage applying this link. mobdro for pc or computer nice.

Thu 24 Mar ’16


good download and install Vidmate app on your PC. Vidmate App downloaded full and also movies of different vidmatedownloadapp nice.

Sat 14 May ’16


Very Nice blog i like your effort.
ShowBox Apk Download on your android devices and enjoy live tv streaming.

Fri 20 May ’16


Along with the streaming, the app also gives you an option of downloading the video which can be watched offline when you don’t have an internet connection.
snaptube app download

Wed 1 Jun ’16

voot app

very nice post

Tue 28 Jun ’16


good which launched 1Channel addon. Phoenix addon Install salts on kodi and includes a huge collection of the repo’s required nice.

Wed 17 Aug ’16


good Xender is normally one of the world’s top rated request Xender Free software from Yahoo Take up Retail outlet. download xender nice.

Tue 30 Aug ’16


good that’s kept on your device’s recollection by only picking You TV Player you will find all the types. You can put a stream on download You TV Player nice.

Wed 12 Oct ’16


good any various other video participant for take up the video. mobdro download desired clips and videos on the world wide web, and nice.

Mon 21 Nov ’16


awesome water and drinking water. Water Filters square measure|are} higher for our Planet! day by day in Best Aquasana Water Filter attributable to this, the drinking water business has seen tremendous growth in recent years nice.

Sun 12 Feb ’17

mali malkova

good job guys, thanks for the useful information!

Wed 15 Feb ’17


good Download your most liked video clips for your future watch. download mobdro you can see its icon on All Apps food selection of BlueStacks nice.

Sat 18 Feb ’17


Software mxf converter free download to convert HD camcorder files.  avchd convert avchd video files to avi, mp4, wmv, mov mts to avi mp4 mov mkv iMovie, FCP/FCE with mts file, so to convert mts files for your PC and mobiles. mod file and convert tod files just free download mod video converter. ts files and m2ts

Fri 24 Feb ’17


good and Mac OS X, all the same, on the off chance that you are Mini Militia Game Mod & Pro APK Cheats | Doodle Army 2 the telephone number and also gadget IDs, whether a call is dynamic, great.

Fri 3 Mar ’17


good and install the most up to date version of Vidmate apk. Vidmate App reconnect it or return to download of the file again nice.

Wed 8 Mar ’17



Using Vidmate APK record you can download Vidmate for windows 10, 8.1, 8, 7 PC, convenient workstation. From here download latest Vidmate APK record. Directly go to steps how to present Vidmate for Laptop windows.

From above get latest click here to know how to introduce vidmate application 2017 version.

By and by going to Settings > Security > Unknown Sources on your android phone.

By and by it’s an awesome chance to present Vidmate on your PC by twofold tapping Vidmate APK archive or right snap and open with Bluestacks APK installer.

Note: For better online video downloader for iPhone 7 here is best video downloader for iPhone 7 plus

Hold up to see the foundation and start seeing Vidmate TV appears and that is just the tip of the chunk of ice.

Believe you took after the strategy and presented Vidmate for PC and Vidmate for windows 8.1, 10, 8, 7 versatile workstations, PC and on desktop contraptions free

Sat 11 Mar ’17


good musician and also title tags, all covered into Peggo APK Peggo is a software program that enables you to record nice.

Sat 11 Mar ’17


good and set up ACMarket to any apple iphone, iPad, or iPod touch acmarket yet it was gone. Nonetheless, there are still nice.

Fri 24 Mar ’17


Again, remember that while Mobdro might let Mobdro Online TV has resolved the trouble really precisely.

Mon 3 Apr ’17


It offers all the costs and non-premium apps in its application. aptoide apk installer Moreover, the Aptoide customer application handles downloads.

Thu 15 Jun ’17

Distribution Homework SAS

I am certain this post has offered me some assistance with saving numerous hours of perusing other related presents just on Distribution Homework SAS
find what I was searching for. Much obliged!

Fri 16 Jun ’17

mua hàng mã

Vào ngày rằm và mồng 1 hằng tháng mọi người thường có thói quen mua các đồ quần áo mua hàng mã ma chay cúng lễ để đốt cho nhữn người thân quá cố của mình

Sat 17 Jun ’17

tien dola

Giấy ]”] tien dola[/url] là gì đây là một trong những loại tiền cõi âm thường được sử dụng trong các dịp cúng lễ quan trọng trong năm. Cũng như thường được đốt trong các ngày rằm, mồng 1 hay các ngày lễ khác,

Sat 17 Jun ’17

tiền đô la

Giấy tien dola là gì đây là một trong những loại tiền cõi âm thường được sử dụng trong các dịp cúng lễ quan trọng trong năm. Cũng như thường được đốt trong các ngày rằm, mồng 1 hay các ngày lễ khác,

Sat 24 Jun ’17


Thanks for your blog, it contains all my favorite plugins and I can always find them here food near me

Sat 24 Jun ’17


nice post thanks admin

good post

Sat 1 Jul ’17

Solidworks Homework Help

I appreciate this work amazing post for us I like it.

Sat 1 Jul ’17

Pakistan's Leading Digital & Social Media Agency

Such a nice post, keep up the fantastic work

Mon 10 Jul ’17


Great post! I am actually getting ready to across this information, is very helpful my friend. Also great blog here with all of the valuable information you have. Keep up the good work you are doing here.

Tue 11 Jul ’17


Class aliquet, maecenas mus magna tempor felis. Sodales lacus ultricies. Quisque. Per molestie ante proin blandit arcu tellus. Sapien. Inceptos primis ligula habitasse elementum purus ultrices at blandit tortor aenean. places to eat near me

Sun 23 Jul ’17


With my youngest at violin lessons twice a week and the oldest getting really into her aquarels at the moment, do I really have time to get involved in the local community? Quinoa is great in a packed lunch but it doesn’t keep Quentin full for his after-school amateur dramatics. Where have all the real socialists gone?

online timer

Sun 23 Jul ’17


We were chatting over a coffee, simple filter, not Nescafe (baby-killers) and started to think out loud. The whole concept of maternity leave is an affront to gender equality - let’s put an end to this patriarchal system of repression and stigmatisation! Why can’t we all just get along?

online stopwatch

Sat 5 Aug ’17


It is inescapable to overlook that nowadays social media network Instagram for PC the mobile phone might be being for nerds.

Mon 7 Aug ’17

Admin pass

Nice plugin, it was really useful for me. thanks
router login

Tue 10 Oct ’17


Thank you for some other wonderful post. Where else may just anybody get that type of info in such an ideal way of writing? I have a presentation subsequent week, and I am on the search for such info.
Visit me

Sat 11 Nov ’17


I was very sure about this. And it looks like I’m having problems with these string functions.

Mon 13 Nov ’17


I was extremely happy to be here. The video is pretty good and meaningful to me. Sorry this is my job @

Fri 5 Jan ’18

Nordictrack Treadmills Comparison

I loved the way you discuss the topic great work thanks for the share Your informative post.

Thu 18 Jan ’18


Fri 26 Jan ’18

John Edward

Science Channel’s are giving a complete Java Programming Assignment Help Assistance  knowledge to its viewers about every thing students write done dissertation on this subjects and show its importance.

Fri 26 Jan ’18

Brian Joseph

This is really great work. dissertation help service  Thank you for sharing such a useful information here in the blog.

Mon 5 Feb ’18


crediti fifa 18 no doubt you are going good

Tue 6 Feb ’18

Why Men Pull Away

I think this is a standout amongst the most critical data for me. What"s more, i"m happy perusing your article. Be that as it may, ought to comment on some broad things Why Men Pull Away

Fri 9 Feb ’18


You did really good work. I really appreciate your new and different post.
Please guys keep it up and share with us some unique post in the future…
ROS PC Download

Wed 14 Feb ’18


I love the way you shared all the information here. I’d like to share it with my friends on social media. Thanks for sharing such an informative content.

Wed 14 Feb ’18


Hi, I am going to try this code today and will let you now. Thanks for sharing this worthwhile information here. You can visit this site

Mon 19 Feb ’18

pillole dimagranti

Thanks to everyone who contributed to this website it’s really well done and I like it a lot.

Sat 24 Feb ’18

Frank Jimenez

Playing games with mods is very common among online and offline game players these days. Xmodgames is not less than a superpower in the hands of the game lovers with which they can turn your game in any direction.

Wed 28 Feb ’18

Michael G

This looks promising, I would love to be able to use PHP string functions easier. I own a pensacola foreclosures business and need some programming done.

Sat 3 Mar ’18


ADP is one of the finest services that provides technical data management systems to control and manage different aspects of a company. Depending on the size of the client and the capabilities of their employee management adp portal provides many services.

Sat 10 Mar ’18

my jio application

Very Interesting and wonderfull information keep sharing

Sat 10 Mar ’18

Mobdro apk

jio app download

Sun 11 Mar ’18


I also noticed some sudden improvement on my ranks and positive trends on my impressions

Wed 21 Mar ’18


good job guys, thanks for the useful information!

Sat 24 Mar ’18

Cottage Cheese

Thank a lot. You have done excellent job. I enjoyed your blog . Nice efforts Cottage Cheese

Fri 30 Mar ’18


Add-ons like this make life a whole lot easier. I intend to use it on my website about mice control.

Sat 7 Apr ’18


ShowBox for PC. We don’t officially have a PC/Windows version of ShowBox, however we can still run it. Follow the steps below -.
Download BlueStacks
showbox for pc ,
Show For Mac
Showbox For PC Download
Showbox For Windows
Showbox online
Showbox For Blackberry
Showbox For iOS
Showbox For iphone
Showbox For Windows PC Free
Showbox apk

Wed 11 Apr ’18


Good plugin. Thank you for sharing. It’s very helpful for me192.168.1.1 admin

Sun 15 Apr ’18

Thomas Tailer

I’m getting excited about this kind of beneficial information. Thanks for sharing. 192.168.l.l

Thu 19 Apr ’18

Dennis Smith

Download the GameCIH APK file from the direct link given here tap on the gamecih apk file to begin.

Thu 3 May ’18

Macy Brown

I find out much information on your post related to my work and it is very helpful for me I really appreciate you to post more. Get saving deals on my page
godaddy 12 dollar Hosting Thanks for visiting.

Mon 14 May ’18


Thank you very much for your post, which is very helpful to me

Fri 1 Jun ’18

Franco Clarence

Amazing post… Xender application is the most driving and awesome application which is utilized for send, exchange and get records. It utilizes Wi-Fi to exchange documents between two gadgets.
Xender for PC Windows
Xender for PC
Xender for Blackberry (9900/9360/9220)
Download Xender for IOS/iPhone
Xender for MAC PC

Wed 20 Jun ’18


Bigg Boss Telugu season 1 was hosted by Jr. NTR. The season 1 was popular and made an achievement as makers expected. As makers made their big efforts to put in have the show in many languages. The Bigg boss show is a multilingual show. As the season 1 bigg boss telugu vote gained more attention and appraisal the makers decided to move for the season 2. Daily the series duration goes for 90 minutes.

Mon 2 Jul ’18


A good plug-in. It’s very helpful to me. Thank you router login

Fri 13 Jul ’18

Ganpat Haile

Free NCERT Solutions for the class 6, 7, 8, 9, 10, 11 and 12 for the subjects Maths, Science, Hindi, Physics, Chemistry, Biology, English, Social Science (History, Geography, Civics and Economics). NCERT Exemplar Problems Solutions for class ninth and tenth maths and science and for class eleventh and twelfth Mathematics, Phy, chem, Bio. CBSE Sample Papers, Previous Year Papers for class ix and x maths, science, sociology, English and Hindi, for class xi and xii maths, Economics, Accountancy, Business Studies, Physics Education, Computer Science, Informatics Practices, English. Additionally download Test Papers, Notes and Assignments, Model Test Papers with arrangements, Online Study Material in PDF organize. Presently transfer your Holiday Homework and get arrangements and thoughts.

Free NCERT Solutions for the class 6, 7, 8, 9, 10, 11 and 12 for the subjects Maths, Science, Hindi, Physics, Chemistry, Biology, English, Social Science (History, Geography, Civics and Economics). NCERT Exemplar Problems Solutions for class 9th and 10th maths & science and for class 11th and 12th Mathematics, Phy, chem, Bio. CBSE Sample Papers, Previous Year Papers for class ix and x maths, science, social science, English and Hindi, for class xi and xii maths, Economics, Accountancy, Business Studies, Physics Education, Computer Science, Informatics Practices, English. Also download Test Papers, Notes and Assignments, Model Test Papers with solutions, Online Study Material in PDF format. Now upload your Holiday Homework and get solutions and ideas.

NCERT Solutions for Class 8 Science
Class 8 Science NCERT Solutions

Wed 25 Jul ’18


Those who write and want to work in lucknow should go for grammar classes.

Mon 30 Jul ’18


I am so grateful for your blog post.Much thanks again. Awesome.

Mon 30 Jul ’18


This is a really great and interesting post I really love to read your post. thank you so much for publishing such a really informative post. I simply wish to let you know that I just look into your site and also I locate it really fascinating and useful.
keep doing a great work.
Dresslink Coupon Code

Tue 31 Jul ’18


Captivate your audience with trusted content and provide them writing jobs in Lucknow

Tue 21 Aug ’18

Vishakha Singh

I am having such a good time and i thought it is good to be a part of this article.Thanks for this greatest effort and i hope it is important to be here on this page.

Sun 26 Aug ’18


a real intresting blog i have seen so far with all of the productual stuff reviews especially Boom Beach hack apk that i found really working for me.

Thu 30 Aug ’18

Sophie Miller

Thank you for your work on the blog! You’re doing a good job!
hardest colleges to get into

Fri 31 Aug ’18

Preti Arora

Howdy! I simply wish to give a huge thumbs up for the great information you have here on this post. I will be coming again to your site for extra soon. thanks

Do Have a visit at our site, where you could get happy diwali quotes, wishes, sms and greetings!

Tue 4 Sep ’18


Great post here I found lots of interesting information from here and I will definitely share this with on other social sites…

Thu 6 Sep ’18


This is a brilliant exciting article. I am inside and out that truly matters content with your radiant work. You put unbelievably particularly fulfilling information. Keep it up. Keep blogging. Needing to inspect your next post.

Sat 8 Sep ’18

Vishakha Singh

It is good to be a part of this awesome post and i was taking a look on this post and then i found something fresh on this awesome post.You did such a awesome job.

Sat 8 Sep ’18

Vishakha Singh

It is good to be a part of this awesome post and i was taking a look on this post and then i found something fresh on this awesome post.You did such a awesome job.

Thu 20 Sep ’18

leon falix

It is good to be a part of this awesome post and i was taking a look on this post and then i found something fresh on this awesome post.You did such a awesome job.

Fri 21 Sep ’18


Quite informative blog you have shared thanks for this and visit to the link to get Reigning Champ Discount Coupons

Fri 21 Sep ’18


thanks for this blog visit to the link to get Reigning Champ Deals

Fri 21 Sep ’18

Kimberly Suzzene

As a Php Developer i gained much important knowledge from here thanks for updating

Fri 5 Oct ’18


Job and Education Latest Updates of Careers Results and Admit Cards Hall Call Letters and All the Updates and News Check HereThe Recruitment Exams
Latest Jobs and Career Follow Here the Website.

Fri 16 Nov ’18


Truly, this article is really one of the very best in the history of articles. I am a antique ’Article’ collector and I sometimes read some new articles if I find them interesting. And I found this one pretty fascinating and it should go into my collection. Very good work!

Post a comment





Your comment:

Please answer the following question to assure your intentions are honorable: Name a movie that's set "A long time ago in a galaxy far away..." (9 characters required)

Remember my personal information
Notify me of follow-up comments?