In: PHP
29 Jun 2010If you want to use PHP to find image in your HTML, you can use following PHP script: 1 2 3 $htmlCode = ‘Some HTML with image <img src="/demo.jpg">’; preg_match("#<img(.*)src=(.*)>#i", $htmlCode, $match); echo $match[0];
To build URL with Zend Framework, you should use: echo $this->url(array $urlOptions = array(), $name = null, $reset = false, $encode = true); so, in order to use Zend URL, use following: echo $this->url(array(’module’ => ‘moduleName’, ‘controller’ => ‘controllerName’, ‘action’ => ‘actionName’), null, true);