Markets | Tue Jul 30, 2013 6:18pm EDT

S&P 500, Nasdaq end up as tech gains; potash shares sink