public function quoteInto($text, $value, $type = null, $count = null)
    {
        if ($count === null) {
            return str_replace('?', $this->quote($value, $type), $text);
        } else {
            while ($count > 0) {
                if (strpos($text, '?') !== false) {
                    $text = substr_replace($text, $this->quote($value, $type), strpos($text, '?'), 1);
                }
                --$count;
            }
            return $text;
        }
    }
public function quoteInto($text, $value, $type = null, $count = null)
    {
        if ($count === null) {
            return str_replace('?', $this->quote($value, $type), $text);
        } else {
            while ($count > 0) {
                if (strpos($text, '?') !== false) {
                    $text = substr_replace($text, $this->quote($value, $type), strpos($text, '?'), 1);
                }
                --$count;
            }
            return $text;
        }
    }
public function quoteInto ( $ text , $ value , $ type = null , $ count = null ) { if ( $ count === null ) { return str_replace ( '?' , $ this -> quote ( $ value , $ type ) , $ text ) ; } else { while ( $ count > 0 ) { if ( strpos ( $ text , '?' ) !== false ) { $ text = substr_replace ( $ text , $ this -> quote ( $ value , $ type ) , strpos ( $ text , '?' ) , 1 ) ; } -- $ count ; } return $ text ; } }
Quotes a value and places into a piece of text at a placeholder.

The placeholder is a question-mark; all placeholders will be replaced
with the quoted value.   For example:

<code>
$text = "WHERE date < ?";
$date = "2005-01-02";
$safe = $sql->quoteInto($text, $date);
// $safe = "WHERE date < '2005-01-02'"
</code>

@param string  $text  The text with a placeholder.
@param mixed   $value The value to quote.
@param string  $type  OPTIONAL SQL datatype
@param integer $count OPTIONAL count of placeholders to replace
@return string An SQL-safe quoted value placed into the original text.
Quotes a value and places into a piece of text at a placeholder .