How do you replace text from an array using vb.net?
In PHP it you would simply create an array() and use str_replace() like so
$str = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.';
$find = array('Lorem', 'sit', 'elit');
$replace = str_replace($find, '', $str);
but how is it done using vb.net?
Im currently replacing like this:
With TextBox1
: .Text = .Text.Replace("Lorem", "")
: .Text = .Text.Replace("sit", "")
: .Text = .Text.Replace("elit", "")
: End With
but figured an array might be a better, faster, less resourceful option as everything that needs replacing is replaced with the same thing.
stringis not an array. I'm not familiar with PHP anymore, so you might want to clarify your question.