<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>Replacing parameters in string &#8211; Akademia Przywództwa Liderów Oświaty</title>
		<atom:link href="https://aplo.pl/forums/topic/replacing-parameters-in-string-2/feed/" rel="self" type="application/rss+xml" />
		<link>https://aplo.pl/forums/topic/replacing-parameters-in-string-2/feed/</link>
		<description></description>
		<lastBuildDate>Sun, 12 Apr 2026 07:10:10 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>pl-PL</language>

		
														
					
				<item>
					<guid>https://aplo.pl/forums/topic/replacing-parameters-in-string-2/#post-306</guid>
					<title><![CDATA[Replacing parameters in string]]></title>
					<link>https://aplo.pl/forums/topic/replacing-parameters-in-string-2/#post-306</link>
					<pubDate>Wed, 13 Jun 2018 12:34:11 +0000</pubDate>
					<dc:creator>wpopieka</dc:creator>

					<description>
						<![CDATA[
						<p>Dear users,<br />
I have an array like this:</p>
<pre>
$par['quantity'] = '10';
$par['sender'] = 'Peter';
$par['date'] = '12/12/2012';
</pre>
<p>And a string like this:<br />
$str = &#8216;{$sender} sent you {$quantity} objects on {$date}&#8217;;<br />
I want to replace every {$variable} with $par[&#8216;variable&#8217;]<br />
I know I have to use preg_replace()<br />
How can I do?<br />
Thanks</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

