Gandalfissimo
New Member
I'm really stucked on this one. I have a function \[code\]Get("FieldName")\[/code\] which is getting a field value from the database with that field name of document. This function is used by CMS users in document control. (e.g. they type Get("NewTitle") and the corresponding value will be displayed on the front.To do this I need to transform the function in my code so it would look like \[code\]Get("FieldName",DocumentID)\[/code\] in order to look for the field in the right document. I hope that this is understandable and I would really very much appreciated a help on this. I've been thinking about using pred_replace but I have no luck.Edit:This is the html user writes\[code\]<h1>News title is: <?php echo Get("NewsTitle")?></h1> \[/code\]In php module I get this html and before executing the code in it I need to transform it. \[code\]// I have the documentID here$DocumentID = 1;// I get the html $html = <h1>News title is: <?php echo Get("NewsTitle")?></h1> \[/code\]then I need to return the $html with the Get("NewsTitle") transformed into Get("NewsTitle", $DocumentID)