Hmm... I forgot to mention, that I want to read seperate templates from files and place them at this position. So this will be too much code. I need a seperate function that does that.
On 26 Mai, 19:01, Alexandru Ciobanu <ics.cake...@gmail.com> wrote: > On 05/26/2009 07:57 PM, Benedikt R. wrote:> Hey! > > > Is there a way to add a global function (which can be called either > > from the layout, a view or a controller) that parses a string? > > > For example: > > I have a string that contains an article: "Lorem ipsum dolor sit amet, > > consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut > > labore et dolore magna aliquyam erat, sed diam voluptua." > > > Now I want to create a function, that replaces the word 'consetetur' > > in this string. How do i accomplish that? > > str_replace not good enough? > > http://php.net/str_replace --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---